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

Xueming Li xuemingl at nvidia.com
Mon Feb 27 07:58:59 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/01/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=8ab731497d62848d74a06e6f80ad41e2da5ff54c

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8ab731497d62848d74a06e6f80ad41e2da5ff54c 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 134d79a555..e366f81a0f 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -4483,8 +4483,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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:41.957126300 +0800
+++ 0032-app-testpmd-fix-interactive-mode-with-no-ports.patch	2023-02-27 14:08:40.749237000 +0800
@@ -1 +1 @@
-From 7e40372522c5a129da616d1420ff582968b81b46 Mon Sep 17 00:00:00 2001
+From 8ab731497d62848d74a06e6f80ad41e2da5ff54c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 7e40372522c5a129da616d1420ff582968b81b46 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list