summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/openvswitch.h
diff options
context:
space:
mode:
authorJarno Rajahalme2017-02-09 20:21:55 +0100
committerDavid S. Miller2017-02-10 04:59:34 +0100
commitcb80d58fae76d8ea93555149b2b16e19b89a1f4f (patch)
tree9bbc36a568cbbf89d80051d26a9e6f174d3c46e2 /include/uapi/linux/openvswitch.h
parentopenvswitch: Do not trigger events for unconfirmed connections. (diff)
downloadkernel-qcow2-linux-cb80d58fae76d8ea93555149b2b16e19b89a1f4f.tar.gz
kernel-qcow2-linux-cb80d58fae76d8ea93555149b2b16e19b89a1f4f.tar.xz
kernel-qcow2-linux-cb80d58fae76d8ea93555149b2b16e19b89a1f4f.zip
openvswitch: Unionize ovs_key_ct_label with a u32 array.
Make the array of labels in struct ovs_key_ct_label an union, adding a u32 array of the same byte size as the existing u8 array. It is faster to loop through the labels 32 bits at the time, which is also the alignment of netlink attributes. 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 'include/uapi/linux/openvswitch.h')
-rw-r--r--include/uapi/linux/openvswitch.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index 375d812fea36..96aee34ef55f 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -446,9 +446,13 @@ struct ovs_key_nd {
__u8 nd_tll[ETH_ALEN];
};
-#define OVS_CT_LABELS_LEN 16
+#define OVS_CT_LABELS_LEN_32 4
+#define OVS_CT_LABELS_LEN (OVS_CT_LABELS_LEN_32 * sizeof(__u32))
struct ovs_key_ct_labels {
- __u8 ct_labels[OVS_CT_LABELS_LEN];
+ union {
+ __u8 ct_labels[OVS_CT_LABELS_LEN];
+ __u32 ct_labels_32[OVS_CT_LABELS_LEN_32];
+ };
};
/* OVS_KEY_ATTR_CT_STATE flags */