[dpdk-dev] [PATCH v1 08/12] net/octeontx: fix the jumbo frame flag condition for mtu set

Steve Yang stevex.yang at intel.com
Wed Dec 9 04:16:24 CET 2020


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 at intel.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 3ee7b043fd..0b79360885 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -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;
-- 
2.17.1



More information about the dev mailing list