net/cxgbe: fix jumbo frame flag condition
authorSteve Yang <stevex.yang@intel.com>
Mon, 18 Jan 2021 07:04:23 +0000 (07:04 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 19 Jan 2021 02:30:15 +0000 (03:30 +0100)
commit5dfbad550cafbc09aaaff07072cb2eb5f2a1fdaa
treec335b6769ff68178a5d2e3f2d305633481b5a228
parent48554c7db7eaef9b7c69f7ad8dd60fe53e78fbde
net/cxgbe: fix jumbo frame flag condition

The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition.
If the Ether overhead is larger than 18 when it supports VLAN tag,
that will cause the jumbo flag rx offload is wrong when MTU size is
'RTE_ETHER_MTU'.

This fix will normalize the boundary condition with 'RTE_ETHER_MTU'
and overhead even though current overhead is 18.

Fixes: 4b2eff452d2e ("cxgbe: enable jumbo frames")
Fixes: 0ec33be4c857 ("cxgbe: allow to change mtu")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/cxgbe/cxgbe.h
drivers/net/cxgbe/cxgbe_ethdev.c