flow.h (74f84a5726c7d08c27745305e67474b8645c541d) flow.h (7d5437c709ded4f152cb8b305d17972d6707f20c)
1/*
2 * Copyright (c) 2007-2011 Nicira, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public
6 * License as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but

--- 26 unchanged lines hidden (view full) ---

35struct sk_buff;
36
37struct sw_flow_actions {
38 struct rcu_head rcu;
39 u32 actions_len;
40 struct nlattr actions[];
41};
42
1/*
2 * Copyright (c) 2007-2011 Nicira, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public
6 * License as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but

--- 26 unchanged lines hidden (view full) ---

35struct sk_buff;
36
37struct sw_flow_actions {
38 struct rcu_head rcu;
39 u32 actions_len;
40 struct nlattr actions[];
41};
42
43/* Used to memset ovs_key_ipv4_tunnel padding. */
44#define OVS_TUNNEL_KEY_SIZE \
45 (offsetof(struct ovs_key_ipv4_tunnel, ipv4_ttl) + \
46 FIELD_SIZEOF(struct ovs_key_ipv4_tunnel, ipv4_ttl))
47
48struct ovs_key_ipv4_tunnel {
49 __be64 tun_id;
50 __be32 ipv4_src;
51 __be32 ipv4_dst;
52 u16 tun_flags;
53 u8 ipv4_tos;
54 u8 ipv4_ttl;
55};
56
43struct sw_flow_key {
57struct sw_flow_key {
58 struct ovs_key_ipv4_tunnel tun_key; /* Encapsulating tunnel key. */
44 struct {
45 u32 priority; /* Packet QoS priority. */
46 u32 skb_mark; /* SKB mark. */
47 u16 in_port; /* Input switch port (or DP_MAX_PORTS). */
48 } phy;
49 struct {
50 u8 src[ETH_ALEN]; /* Ethernet source address. */
51 u8 dst[ETH_ALEN]; /* Ethernet destination address. */

--- 122 unchanged lines hidden (view full) ---

174struct flow_table *ovs_flow_tbl_expand(struct flow_table *table);
175struct flow_table *ovs_flow_tbl_rehash(struct flow_table *table);
176void ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow);
177void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow);
178u32 ovs_flow_hash(const struct sw_flow_key *key, int key_len);
179
180struct sw_flow *ovs_flow_tbl_next(struct flow_table *table, u32 *bucket, u32 *idx);
181extern const int ovs_key_lens[OVS_KEY_ATTR_MAX + 1];
59 struct {
60 u32 priority; /* Packet QoS priority. */
61 u32 skb_mark; /* SKB mark. */
62 u16 in_port; /* Input switch port (or DP_MAX_PORTS). */
63 } phy;
64 struct {
65 u8 src[ETH_ALEN]; /* Ethernet source address. */
66 u8 dst[ETH_ALEN]; /* Ethernet destination address. */

--- 122 unchanged lines hidden (view full) ---

189struct flow_table *ovs_flow_tbl_expand(struct flow_table *table);
190struct flow_table *ovs_flow_tbl_rehash(struct flow_table *table);
191void ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow);
192void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow);
193u32 ovs_flow_hash(const struct sw_flow_key *key, int key_len);
194
195struct sw_flow *ovs_flow_tbl_next(struct flow_table *table, u32 *bucket, u32 *idx);
196extern const int ovs_key_lens[OVS_KEY_ATTR_MAX + 1];
197int ovs_ipv4_tun_from_nlattr(const struct nlattr *attr,
198 struct ovs_key_ipv4_tunnel *tun_key);
199int ovs_ipv4_tun_to_nlattr(struct sk_buff *skb,
200 const struct ovs_key_ipv4_tunnel *tun_key);
182
183#endif /* flow.h */
201
202#endif /* flow.h */