net/axgbe: fix jumbo frame flag condition for MTU set
authorSteve Yang <stevex.yang@intel.com>
Mon, 18 Jan 2021 07:04:24 +0000 (07:04 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 19 Jan 2021 02:30:15 +0000 (03:30 +0100)
commit2570c033579aa8bf51bd995d8c4df8c3e3966386
treed789657a908fb6a6414042cc3b69023ed69a022a
parent5dfbad550cafbc09aaaff07072cb2eb5f2a1fdaa
net/axgbe: fix jumbo frame flag condition for MTU set

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: b58d8781fa1f ("net/axgbe: support setting MTU")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/axgbe/axgbe_ethdev.c
drivers/net/axgbe/axgbe_ethdev.h