patch 'app/testpmd: fix tunnel TSO capability check' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:11:46 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/13/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=6f1c35e7a802084271fedcfcf9590785d8c30723

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 6f1c35e7a802084271fedcfcf9590785d8c30723 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Sat, 11 Nov 2023 12:59:41 +0800
Subject: [PATCH] app/testpmd: fix tunnel TSO capability check
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 6d4def820aa7d118f1ebdebf7af8ba6299ac20ee ]

Currently, testpmd set tunnel TSO offload even if fail to get dev_info.
In this case, the 'tx_offload_capa' in dev_info is a random value,

Fixes: 6f51deb903b2 ("app/testpmd: check status of getting ethdev info")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 app/test-pmd/cmdline.c | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d24d16c7e0..a45743dd86 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -4950,39 +4950,33 @@ struct cmd_tunnel_tso_set_result {
 	portid_t port_id;
 };
 
-static struct rte_eth_dev_info
-check_tunnel_tso_nic_support(portid_t port_id)
+static void
+check_tunnel_tso_nic_support(portid_t port_id, uint64_t tx_offload_capa)
 {
-	struct rte_eth_dev_info dev_info;
-
-	if (eth_dev_info_get_print_err(port_id, &dev_info) != 0)
-		return dev_info;
-
-	if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO))
+	if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO))
 		fprintf(stderr,
 			"Warning: VXLAN TUNNEL TSO not supported therefore not enabled for port %d\n",
 			port_id);
-	if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO))
+	if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO))
 		fprintf(stderr,
 			"Warning: GRE TUNNEL TSO not supported therefore not enabled for port %d\n",
 			port_id);
-	if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO))
+	if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO))
 		fprintf(stderr,
 			"Warning: IPIP TUNNEL TSO not supported therefore not enabled for port %d\n",
 			port_id);
-	if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO))
+	if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO))
 		fprintf(stderr,
 			"Warning: GENEVE TUNNEL TSO not supported therefore not enabled for port %d\n",
 			port_id);
-	if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IP_TNL_TSO))
+	if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_IP_TNL_TSO))
 		fprintf(stderr,
 			"Warning: IP TUNNEL TSO not supported therefore not enabled for port %d\n",
 			port_id);
-	if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO))
+	if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO))
 		fprintf(stderr,
 			"Warning: UDP TUNNEL TSO not supported therefore not enabled for port %d\n",
 			port_id);
-	return dev_info;
 }
 
 static void
@@ -4992,6 +4986,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
 {
 	struct cmd_tunnel_tso_set_result *res = parsed_result;
 	struct rte_eth_dev_info dev_info;
+	int ret;
 
 	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
 		return;
@@ -5003,7 +4998,11 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
 	if (!strcmp(res->mode, "set"))
 		ports[res->port_id].tunnel_tso_segsz = res->tso_segsz;
 
-	dev_info = check_tunnel_tso_nic_support(res->port_id);
+	ret = eth_dev_info_get_print_err(res->port_id, &dev_info);
+	if (ret != 0)
+		return;
+
+	check_tunnel_tso_nic_support(res->port_id, dev_info.tx_offload_capa);
 	if (ports[res->port_id].tunnel_tso_segsz == 0) {
 		ports[res->port_id].dev_conf.txmode.offloads &=
 			~(RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:25.691185000 +0800
+++ 0081-app-testpmd-fix-tunnel-TSO-capability-check.patch	2023-12-11 17:56:23.117652300 +0800
@@ -1 +1 @@
-From 6d4def820aa7d118f1ebdebf7af8ba6299ac20ee Mon Sep 17 00:00:00 2001
+From 6f1c35e7a802084271fedcfcf9590785d8c30723 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6d4def820aa7d118f1ebdebf7af8ba6299ac20ee ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index d68418bc67..1fffb07db1 100644
+index d24d16c7e0..a45743dd86 100644
@@ -22 +24 @@
-@@ -5035,39 +5035,33 @@ struct cmd_tunnel_tso_set_result {
+@@ -4950,39 +4950,33 @@ struct cmd_tunnel_tso_set_result {
@@ -70 +72 @@
-@@ -5077,6 +5071,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
+@@ -4992,6 +4986,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
@@ -78 +80 @@
-@@ -5088,7 +5083,11 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
+@@ -5003,7 +4998,11 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,


More information about the stable mailing list