summaryrefslogtreecommitdiff
path: root/net/openvswitch/conntrack.h
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno@ovn.org>2017-02-09 22:22:01 +0300
committerDavid S. Miller <davem@davemloft.net>2017-02-10 06:59:34 +0300
commit316d4d78cf9b6795b83f97c45368748741df418c (patch)
treee1a5001b3df43bc608a143fc16c6a7f2ff039807 /net/openvswitch/conntrack.h
parentdd41d33f0b033885211a5d6f3ee19e73238aa9ee (diff)
downloadlinux-316d4d78cf9b6795b83f97c45368748741df418c.tar.xz
openvswitch: Pack struct sw_flow_key.
struct sw_flow_key has two 16-bit holes. Move the most matched conntrack match fields there. In some typical cases this reduces the size of the key that needs to be hashed into half and into one cache line. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Joe Stringer <joe@ovn.org> Acked-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/conntrack.h')
-rw-r--r--net/openvswitch/conntrack.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/openvswitch/conntrack.h b/net/openvswitch/conntrack.h
index 9e92445dc092..bc7efd1867ab 100644
--- a/net/openvswitch/conntrack.h
+++ b/net/openvswitch/conntrack.h
@@ -76,14 +76,14 @@ static inline int ovs_ct_execute(struct net *net, struct sk_buff *skb,
static inline void ovs_ct_fill_key(const struct sk_buff *skb,
struct sw_flow_key *key)
{
- key->ct.state = 0;
- key->ct.zone = 0;
+ key->ct_state = 0;
+ key->ct_zone = 0;
key->ct.mark = 0;
memset(&key->ct.labels, 0, sizeof(key->ct.labels));
- /* Clear 'ct.orig_proto' to mark the non-existence of original
+ /* Clear 'ct_orig_proto' to mark the non-existence of original
* direction key fields.
*/
- key->ct.orig_proto = 0;
+ key->ct_orig_proto = 0;
}
static inline int ovs_ct_put_key(const struct sw_flow_key *swkey,