net/hns3: fix jumbo frame flag condition for MTU set
authorSteve Yang <stevex.yang@intel.com>
Mon, 18 Jan 2021 07:04:12 +0000 (07:04 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 19 Jan 2021 02:30:14 +0000 (03:30 +0100)
commit3ec35c64be8f93619a04e725bf4af9ecb5329ef0
treeae9b80e695ece983bbc3066da937453f6504f157
parentb6c4c94175e8a72b3de9781bff3453a143cd868f
net/hns3: fix jumbo frame flag condition for MTU set

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

This fix will change the boundary condition with 'HSN3_DEFAULT_FRAME_LEN',
that perhaps impacts the cases of the jumbo frame related.

Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")
Fixes: a5475d61fa34 ("net/hns3: support VF")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Lijun Ou <oulijun@huawei.com>
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/hns3_ethdev_vf.c