diff options
author | Joe Stringer <joestringer@nicira.com> | 2015-08-26 11:31:52 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-27 11:40:43 -0700 |
commit | c2ac667358708d7cce64c78f58af6adf4c1e848b (patch) | |
tree | f24ccd3b0e54fe0ba09ecadb837eef3ecaa014c8 /net/openvswitch/conntrack.h | |
parent | 86ca02e77408bb58ba596c1a411ec7f631733690 (diff) | |
download | op-kernel-dev-c2ac667358708d7cce64c78f58af6adf4c1e848b.zip op-kernel-dev-c2ac667358708d7cce64c78f58af6adf4c1e848b.tar.gz |
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/conntrack.h')
-rw-r--r-- | net/openvswitch/conntrack.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/openvswitch/conntrack.h b/net/openvswitch/conntrack.h index 87b289c..3cb3066 100644 --- a/net/openvswitch/conntrack.h +++ b/net/openvswitch/conntrack.h @@ -20,7 +20,9 @@ struct ovs_conntrack_info; enum ovs_key_attr; #if defined(CONFIG_OPENVSWITCH_CONNTRACK) -bool ovs_ct_verify(enum ovs_key_attr attr); +void ovs_ct_init(struct net *); +void ovs_ct_exit(struct net *); +bool ovs_ct_verify(struct net *, enum ovs_key_attr attr); int ovs_ct_copy_action(struct net *, const struct nlattr *, const struct sw_flow_key *, struct sw_flow_actions **, bool log); @@ -35,7 +37,11 @@ void ovs_ct_free_action(const struct nlattr *a); #else #include <linux/errno.h> -static inline bool ovs_ct_verify(int attr) +static inline void ovs_ct_init(struct net *net) { } + +static inline void ovs_ct_exit(struct net *net) { } + +static inline bool ovs_ct_verify(struct net *net, int attr) { return false; } @@ -66,6 +72,7 @@ static inline void ovs_ct_fill_key(const struct sk_buff *skb, key->ct.state = 0; key->ct.zone = 0; key->ct.mark = 0; + memset(&key->ct.label, 0, sizeof(key->ct.label)); } static inline int ovs_ct_put_key(const struct sw_flow_key *key, |