aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow.h
diff options
context:
space:
mode:
authorJoe Stringer <joestringer@nicira.com>2015-08-26 14:31:52 -0400
committerDavid S. Miller <davem@davemloft.net>2015-08-27 14:40:43 -0400
commitc2ac667358708d7cce64c78f58af6adf4c1e848b (patch)
treef24ccd3b0e54fe0ba09ecadb837eef3ecaa014c8 /net/openvswitch/flow.h
parent86ca02e77408bb58ba596c1a411ec7f631733690 (diff)
openvswitch: Allow matching on conntrack label
Allow matching and setting the ct_label field. As with ct_mark, this is populated by executing the CT action. The label field may be modified by specifying a label and mask nested under the CT action. It is stored as metadata attached to the connection. Label modification occurs after lookup, and will only persist when the conntrack entry is committed by providing the COMMIT flag to the CT action. Labels are currently fixed to 128 bits in size. Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/flow.h')
-rw-r--r--net/openvswitch/flow.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h
index e05e69711ce1..fe527d2dd4b7 100644
--- a/net/openvswitch/flow.h
+++ b/net/openvswitch/flow.h
@@ -116,6 +116,7 @@ struct sw_flow_key {
116 u16 zone; 116 u16 zone;
117 u32 mark; 117 u32 mark;
118 u8 state; 118 u8 state;
119 struct ovs_key_ct_label label;
119 } ct; 120 } ct;
120 121
121} __aligned(BITS_PER_LONG/8); /* Ensure that we can do comparisons as longs. */ 122} __aligned(BITS_PER_LONG/8); /* Ensure that we can do comparisons as longs. */
@@ -220,7 +221,7 @@ int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info,
220 struct sk_buff *skb, 221 struct sk_buff *skb,
221 struct sw_flow_key *key); 222 struct sw_flow_key *key);
222/* Extract key from packet coming from userspace. */ 223/* Extract key from packet coming from userspace. */
223int ovs_flow_key_extract_userspace(const struct nlattr *attr, 224int ovs_flow_key_extract_userspace(struct net *net, const struct nlattr *attr,
224 struct sk_buff *skb, 225 struct sk_buff *skb,
225 struct sw_flow_key *key, bool log); 226 struct sw_flow_key *key, bool log);
226 227