net/enic: fix header sizes when copying flow patterns
authorHyong Youb Kim <hyonkim@cisco.com>
Fri, 30 Oct 2020 07:27:49 +0000 (00:27 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:06 +0000 (23:35 +0100)
commitdd649913cca40dd2a7bbd50d63e82b8b75267795
treefd8e38622ccf12da4fc7bdc6f70b2a4861e540c7
parent8c25b02b082aea2e9a1648ab5efc8207923cb0c0
net/enic: fix header sizes when copying flow patterns

Several functions use sizeof(struct rte_flow_item_eth) and
sizeof(struct rte_flow_item_ipv6) when copying headers. These sizes
used to coincide with the sizes of rte_ether_hdr and
rte_ipv6_hdr. But, with recently added fields, rte_flow_item_eth and
rte_flow_item_ipv6 have grown in size. Use sizeof(rte_ether_hdr) and
sizeof(rte_ipv6_hdr) instead.

Coverity issue: 363572, 363573
Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_fm_flow.c