patch 'examples/multi_process: fix ports cleanup on exit' has been queued to stable release 23.11.5
Xueming Li
xuemingl at nvidia.com
Wed Jul 30 09:10:40 CEST 2025
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/10/25. 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=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2a8ea062d0d0128b790efcbf6298753ad27d9df8
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 2a8ea062d0d0128b790efcbf6298753ad27d9df8 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani at nvidia.com>
Date: Tue, 8 Jul 2025 10:09:54 +0300
Subject: [PATCH] examples/multi_process: fix ports cleanup on exit
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 4382d58097b41d1e1229ce5fc2943994bf44bd83 ]
Device was started but not stopped on exit signal.
Added port stop and close on exit.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
examples/multi_process/symmetric_mp/main.c | 27 ++++++++++++++++++----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 1ff85875df..2dbbaa06f5 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -92,6 +92,25 @@ smp_usage(const char *prgname, const char *errmsg)
exit(1);
}
+static void
+exit_cleanup(void)
+{
+ unsigned int i;
+
+ RTE_LOG(INFO, APP, "Close ports.\n");
+ for (i = 0; i < num_ports; i++) {
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ if (rte_eth_dev_stop(ports[i]))
+ rte_exit(EXIT_FAILURE, "Error stopping ports\n");
+ if (rte_eth_dev_close(ports[i]))
+ rte_exit(EXIT_FAILURE, "Error closing ports\n");
+ }
+ }
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
+ exit(0);
+}
/* signal handler configured for SIGTERM and SIGINT to print stats on exit */
static void
@@ -104,9 +123,10 @@ print_stats(int signum)
printf("Port %u: RX - %u, TX - %u, Drop - %u\n", (unsigned)p_num,
pstats[p_num].rx, pstats[p_num].tx, pstats[p_num].drop);
}
- exit(0);
+ exit_cleanup();
}
+
/* Parse the argument given in the command line of the application */
static int
smp_parse_args(int argc, char **argv)
@@ -486,8 +506,5 @@ main(int argc, char **argv)
rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MAIN);
- /* clean up the EAL */
- rte_eal_cleanup();
-
- return 0;
+ exit_cleanup();
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-07-30 15:02:13.622247762 +0800
+++ 0029-examples-multi_process-fix-ports-cleanup-on-exit.patch 2025-07-30 15:02:12.842041523 +0800
@@ -1 +1 @@
-From 4382d58097b41d1e1229ce5fc2943994bf44bd83 Mon Sep 17 00:00:00 2001
+From 2a8ea062d0d0128b790efcbf6298753ad27d9df8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 4382d58097b41d1e1229ce5fc2943994bf44bd83 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index f7d8439cd4..de16608a0f 100644
+index 1ff85875df..2dbbaa06f5 100644
More information about the stable
mailing list