patch 'app/testpmd: fix interactive mode with no ports' has been queued to stable release 21.11.4

Kevin Traynor ktraynor at redhat.com
Thu Feb 23 16:05:06 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.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 02/28/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://github.com/kevintraynor/dpdk-stable

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

Thanks.

Kevin

---
>From f6a5384a93f14bf104ebc5244f68a9f503f229f0 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Thu, 19 Jan 2023 19:45:59 +0200
Subject: [PATCH] app/testpmd: fix interactive mode with no ports

[ upstream commit 7e40372522c5a129da616d1420ff582968b81b46 ]

Testpmd terminated unconditionally if it failed to start all ports.

The patch allows testpmd to get into the command line,
if the interactive mode was requested.

Fixes: 6937d2103e22 ("app/testpmd: add option to not start device")

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 app/test-pmd/testpmd.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index ce8fd3d7d3..f1daa6e09d 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -4377,6 +4377,11 @@ main(int argc, char** argv)
 	}
 
-	if (!no_device_start && start_port(RTE_PORT_ALL) != 0)
-		rte_exit(EXIT_FAILURE, "Start ports failed\n");
+	if (!no_device_start && start_port(RTE_PORT_ALL) != 0) {
+		if (!interactive) {
+			rte_eal_cleanup();
+			rte_exit(EXIT_FAILURE, "Start ports failed\n");
+		}
+		fprintf(stderr, "Start ports failed\n");
+	}
 
 	/* set all ports to promiscuous mode by default */
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 14:46:24.216104344 +0000
+++ 0015-app-testpmd-fix-interactive-mode-with-no-ports.patch	2023-02-23 14:46:23.718235785 +0000
@@ -1 +1 @@
-From 7e40372522c5a129da616d1420ff582968b81b46 Mon Sep 17 00:00:00 2001
+From f6a5384a93f14bf104ebc5244f68a9f503f229f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7e40372522c5a129da616d1420ff582968b81b46 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 134d79a555..e366f81a0f 100644
+index ce8fd3d7d3..f1daa6e09d 100644
@@ -24 +25 @@
-@@ -4484,6 +4484,11 @@ main(int argc, char** argv)
+@@ -4377,6 +4377,11 @@ main(int argc, char** argv)



More information about the stable mailing list