[dpdk-dev] [PATCH v2 2/5] net/igc: fix max mtu size packets with vlan tag cannot be received by default

SteveX Yang stevex.yang at intel.com
Tue Sep 22 03:23:35 CEST 2020


testpmd will initialize default max packet length to 1518 which doesn't
include vlan tag size in ether overheader. Once, send the max mtu length
packet with vlan tag, the max packet length will exceed 1518 that will
cause packets dropped directly from NIC hw side.

igc can support single vlan tag that need more 4 bytes for max packet size,
so, configures the correct max packet size in dev_config ops.

Fixes: a5aeb2b9e225 ("net/igc: support Rx and Tx")

Signed-off-by: SteveX Yang <stevex.yang at intel.com>
---
 drivers/net/igc/igc_ethdev.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 810568bc5..36ef325a4 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -341,7 +341,12 @@ eth_igc_configure(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	ret  = igc_check_mq_mode(dev);
+	/* Considering vlan tag packet, max frame size should be MTU and
+	 * corresponding ether overhead.
+	 */
+	eth_igc_mtu_set(dev, dev->data->mtu);
+
+	ret = igc_check_mq_mode(dev);
 	if (ret != 0)
 		return ret;
 
-- 
2.17.1



More information about the dev mailing list