diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-01-20 23:15:07 -0800 |
---|---|---|
committer | Pravin B Shelar <pshelar@nicira.com> | 2013-01-20 23:21:20 -0800 |
commit | 61f7c116b24109844678dc85d39fa864db2abfb0 (patch) | |
tree | 52d4a7b6d88b39f4eed90986aeeec7ee43411821 /datapath/flow.h | |
parent | acdf66b53c3538f77608768931da034ec4717045 (diff) |
datapath: Fix nelink attribute size for flow.
Following patch fixes flow buffer size calculation to allocate
sufficient memory for all nested attributes in new tunnel
attribute.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Bug #14767
Diffstat (limited to 'datapath/flow.h')
-rw-r--r-- | datapath/flow.h | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/datapath/flow.h b/datapath/flow.h index 657d01ed..4bc185b0 100644 --- a/datapath/flow.h +++ b/datapath/flow.h @@ -158,25 +158,32 @@ u64 ovs_flow_used_time(unsigned long flow_jiffies); /* Upper bound on the length of a nlattr-formatted flow key. The longest * nlattr-formatted flow key would be: * - * struct pad nl hdr total - * ------ --- ------ ----- - * OVS_KEY_ATTR_PRIORITY 4 -- 4 8 - * OVS_KEY_ATTR_TUN_ID 8 -- 4 12 - * OVS_KEY_ATTR_IPV4_TUNNEL 24 -- 4 28 - * OVS_KEY_ATTR_IN_PORT 4 -- 4 8 - * OVS_KEY_ATTR_SKB_MARK 4 -- 4 8 - * OVS_KEY_ATTR_ETHERNET 12 -- 4 16 - * OVS_KEY_ATTR_ETHERTYPE 2 2 4 8 (outer VLAN ethertype) - * OVS_KEY_ATTR_8021Q 4 -- 4 8 - * OVS_KEY_ATTR_ENCAP 0 -- 4 4 (VLAN encapsulation) - * OVS_KEY_ATTR_ETHERTYPE 2 2 4 8 (inner VLAN ethertype) - * OVS_KEY_ATTR_IPV6 40 -- 4 44 - * OVS_KEY_ATTR_ICMPV6 2 2 4 8 - * OVS_KEY_ATTR_ND 28 -- 4 32 - * ------------------------------------------------- - * total 192 + * struct pad nl hdr total + * ------ --- ------ ----- + * OVS_KEY_ATTR_PRIORITY 4 -- 4 8 + * OVS_KEY_ATTR_TUN_ID 8 -- 4 12 + * OVS_KEY_ATTR_TUNNEL 0 -- 4 4 + * - OVS_TUNNEL_KEY_ATTR_ID 8 -- 4 12 + * - OVS_TUNNEL_KEY_ATTR_IPV4_SRC 4 -- 4 8 + * - OVS_TUNNEL_KEY_ATTR_IPV4_DST 4 -- 4 8 + * - OVS_TUNNEL_KEY_ATTR_TOS 1 3 4 8 + * - OVS_TUNNEL_KEY_ATTR_TTL 1 3 4 8 + * - OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT 0 -- 4 4 + * - OVS_TUNNEL_KEY_ATTR_CSUM 0 -- 4 4 + * OVS_KEY_ATTR_IN_PORT 4 -- 4 8 + * OVS_KEY_ATTR_SKB_MARK 4 -- 4 8 + * OVS_KEY_ATTR_ETHERNET 12 -- 4 16 + * OVS_KEY_ATTR_ETHERTYPE 2 2 4 8 (outer VLAN ethertype) + * OVS_KEY_ATTR_8021Q 4 -- 4 8 + * OVS_KEY_ATTR_ENCAP 0 -- 4 4 (VLAN encapsulation) + * OVS_KEY_ATTR_ETHERTYPE 2 2 4 8 (inner VLAN ethertype) + * OVS_KEY_ATTR_IPV6 40 -- 4 44 + * OVS_KEY_ATTR_ICMPV6 2 2 4 8 + * OVS_KEY_ATTR_ND 28 -- 4 32 + * ---------------------------------------------------------- + * total 220 */ -#define FLOW_BUFSIZE 192 +#define FLOW_BUFSIZE 220 int ovs_flow_to_nlattrs(const struct sw_flow_key *, struct sk_buff *); int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp, |