[dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packet' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Nov 9 19:41:04 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/28c5e8536cf640da738de6bcf388e4f4825eb53e

Thanks.

Luca Boccassi

---
>From 28c5e8536cf640da738de6bcf388e4f4825eb53e Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang at intel.com>
Date: Mon, 2 Nov 2020 08:52:33 +0000
Subject: [PATCH] app/testpmd: fix max Rx packet length for VLAN packet

[ upstream commit f6870a7ed6b3fde94fb936256515bfc53bdc5015 ]

When the max Rx packet length is smaller than the sum of MTU size and
ether overhead size, it should be enlarged, otherwise the VLAN packets
will be dropped.

Fixes: 35b2d13fd6fd ("net: add rte prefix to ether defines")

Signed-off-by: Steve Yang <stevex.yang at intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 app/test-pmd/testpmd.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 7f59cb02d1..cb4c365cb1 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1301,6 +1301,7 @@ init_config(void)
 	struct rte_gro_param gro_param;
 	uint32_t gso_types;
 	uint16_t data_size;
+	uint16_t overhead_len;
 	bool warning = 0;
 	int k;
 	int ret;
@@ -1337,6 +1338,28 @@ init_config(void)
 			rte_exit(EXIT_FAILURE,
 				 "rte_eth_dev_info_get() failed\n");
 
+		/* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */
+		if (port->dev_info.max_rx_pktlen && port->dev_info.max_mtu)
+			overhead_len = port->dev_info.max_rx_pktlen -
+				port->dev_info.max_mtu;
+		else
+			overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
+		port->dev_conf.rxmode.max_rx_pkt_len =
+						RTE_ETHER_MTU + overhead_len;
+
+		/*
+		 * This is workaround to avoid resize max rx packet len.
+		 * Ethdev assumes jumbo frame size must be greater than
+		 * RTE_ETHER_MAX_LEN, and will resize 'max_rx_pkt_len' to
+		 * default value when it is greater than RTE_ETHER_MAX_LEN
+		 * for normal frame.
+		 */
+		if (port->dev_conf.rxmode.max_rx_pkt_len > RTE_ETHER_MAX_LEN) {
+			port->dev_conf.rxmode.offloads |=
+						DEV_RX_OFFLOAD_JUMBO_FRAME;
+		}
+
 		if (!(port->dev_info.tx_offload_capa &
 		      DEV_TX_OFFLOAD_MBUF_FAST_FREE))
 			port->dev_conf.txmode.offloads &=
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.994081892 +0000
+++ 0076-app-testpmd-fix-max-Rx-packet-length-for-VLAN-packet.patch	2020-11-09 18:40:11.227312776 +0000
@@ -1 +1 @@
-From f6870a7ed6b3fde94fb936256515bfc53bdc5015 Mon Sep 17 00:00:00 2001
+From 28c5e8536cf640da738de6bcf388e4f4825eb53e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f6870a7ed6b3fde94fb936256515bfc53bdc5015 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 33fc0fddf5..c263121a9a 100644
+index 7f59cb02d1..cb4c365cb1 100644
@@ -23 +24 @@
-@@ -1421,6 +1421,7 @@ init_config(void)
+@@ -1301,6 +1301,7 @@ init_config(void)
@@ -31 +32 @@
-@@ -1457,6 +1458,28 @@ init_config(void)
+@@ -1337,6 +1338,28 @@ init_config(void)


More information about the stable mailing list