[v1,08/12] net/octeontx: fix the jumbo frame flag condition for mtu set
Checks
Commit Message
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 'RTE_ETHER_MTU'.
Fixes: 3151e6a687a3 ("net/octeontx: support MTU")
Signed-off-by: Steve Yang <stevex.yang@intel.com>
---
drivers/net/octeontx/octeontx_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -552,7 +552,7 @@ octeontx_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
if (rc)
return rc;
- if (frame_size > RTE_ETHER_MAX_LEN)
+ if (mtu > RTE_ETHER_MTU)
nic->rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
else
nic->rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;