aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/flow.h')
-rw-r--r--net/openvswitch/flow.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h
index e370f6246ee9..aec5e43f690b 100644
--- a/net/openvswitch/flow.h
+++ b/net/openvswitch/flow.h
@@ -40,7 +40,22 @@ struct sw_flow_actions {
40 struct nlattr actions[]; 40 struct nlattr actions[];
41}; 41};
42 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 { 59 struct {
45 u32 priority; /* Packet QoS priority. */ 60 u32 priority; /* Packet QoS priority. */
46 u32 skb_mark; /* SKB mark. */ 61 u32 skb_mark; /* SKB mark. */
@@ -179,5 +194,9 @@ u32 ovs_flow_hash(const struct sw_flow_key *key, int key_len);
179 194
180struct sw_flow *ovs_flow_tbl_next(struct flow_table *table, u32 *bucket, u32 *idx); 195struct 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]; 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 201
183#endif /* flow.h */ 202#endif /* flow.h */