net/hinic: fix jumbo frame flag condition for MTU set
authorSteve Yang <stevex.yang@intel.com>
Mon, 18 Jan 2021 07:04:26 +0000 (07:04 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 19 Jan 2021 02:30:15 +0000 (03:30 +0100)
commite542ab51ab27356ed2f2797b3ec2887ec0226bcf
tree8e9fc0825f493cc68566d413c003da79fbbbe096
parent4d44217b0641c19e750b57c7392c4531c91dda7f
net/hinic: 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: 254bd849b132 ("net/hinic: set jumbo frame offload flag")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/hinic/hinic_pmd_ethdev.c