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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 23 10:36:15 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.8

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/25/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/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From b395818b0abc09e649e2f9e24a85abc8fcf3bfd1 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 13d8c1c72a..799fa9f539 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3990,8 +3990,13 @@ 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 */
 	RTE_ETH_FOREACH_DEV(port_id) {
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 09:36:28.742111733 +0000
+++ 0011-app-testpmd-fix-interactive-mode-with-no-ports.patch	2023-02-23 09:36:28.182169130 +0000
@@ -1 +1 @@
-From 7e40372522c5a129da616d1420ff582968b81b46 Mon Sep 17 00:00:00 2001
+From b395818b0abc09e649e2f9e24a85abc8fcf3bfd1 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 13d8c1c72a..799fa9f539 100644
@@ -24 +25 @@
-@@ -4483,8 +4483,13 @@ main(int argc, char** argv)
+@@ -3990,8 +3990,13 @@ main(int argc, char** argv)


More information about the stable mailing list