patch 'app/testpmd: skip port reset in secondary process' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Fri Nov 11 11:32:57 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.3

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/14/22. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3eec40cfc981278998310420c6816adddc3b0007

Thanks.

Kevin

---
>From 3eec40cfc981278998310420c6816adddc3b0007 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang at intel.com>
Date: Wed, 12 Oct 2022 07:43:59 +0000
Subject: [PATCH] app/testpmd: skip port reset in secondary process

[ upstream commit e9351eaa4c457d5e4acd44efb0c36185c0350229 ]

As stop action has been forbidden in secondary process, so
the reset action should also not be allowed.

Fixes: a550baf24af9 ("app/testpmd: support multi-process")

Signed-off-by: Qiming Yang <qiming.yang at intel.com>
Acked-by: Aman Singh <aman.deep.singh at intel.com>
---
 app/test-pmd/testpmd.c                | 18 ++++++++++--------
 doc/guides/testpmd_app_ug/run_app.rst |  1 +
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 3699c5fd64..3a8eef48e4 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3337,12 +3337,14 @@ reset_port(portid_t pid)
 		}
 
-		diag = rte_eth_dev_reset(pi);
-		if (diag == 0) {
-			port = &ports[pi];
-			port->need_reconfig = 1;
-			port->need_reconfig_queues = 1;
-		} else {
-			fprintf(stderr, "Failed to reset port %d. diag=%d\n",
-				pi, diag);
+		if (is_proc_primary()) {
+			diag = rte_eth_dev_reset(pi);
+			if (diag == 0) {
+				port = &ports[pi];
+				port->need_reconfig = 1;
+				port->need_reconfig_queues = 1;
+			} else {
+				fprintf(stderr, "Failed to reset port %d. diag=%d\n",
+					pi, diag);
+			}
 		}
 	}
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 30edef07ea..ccc1bd6ddb 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -622,4 +622,5 @@ as follows:
 - ``dev_start``
 - ``dev_stop``
+- ``dev_reset``
 - ``rx_queue_setup``
 - ``tx_queue_setup``
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-11 10:32:17.274984567 +0000
+++ 0007-app-testpmd-skip-port-reset-in-secondary-process.patch	2022-11-11 10:32:17.009300506 +0000
@@ -1 +1 @@
-From e9351eaa4c457d5e4acd44efb0c36185c0350229 Mon Sep 17 00:00:00 2001
+From 3eec40cfc981278998310420c6816adddc3b0007 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9351eaa4c457d5e4acd44efb0c36185c0350229 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index f4f1888446..aa7ea29f15 100644
+index 3699c5fd64..3a8eef48e4 100644
@@ -23 +24 @@
-@@ -3340,12 +3340,14 @@ reset_port(portid_t pid)
+@@ -3337,12 +3337,14 @@ reset_port(portid_t pid)
@@ -47 +48 @@
-index 876eb78ada..610e442924 100644
+index 30edef07ea..ccc1bd6ddb 100644
@@ -50 +51 @@
-@@ -601,4 +601,5 @@ as follows:
+@@ -622,4 +622,5 @@ as follows:



More information about the stable mailing list