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>
This commit is contained in:

committed by
David S. Miller

parent
193e309678
commit
cb80d58fae
@@ -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 */
|
||||
|
Reference in New Issue
Block a user