patch 'examples/ethtool: fix exit flag' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:01:17 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.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 12/08/26. 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/33cc1c666d46ce666849538d7b8dc4acb20878ac
Thanks.
Kevin
---
>From 33cc1c666d46ce666849538d7b8dc4acb20878ac Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Mon, 7 Sep 2026 10:03:29 -0700
Subject: [PATCH] examples/ethtool: fix exit flag
[ upstream commit 1adec576ca04af651dd5043a34e9bc047eaeb2ef ]
The exit_now flag is polled by worker_main() on one lcore and set by
main() on another, but is a plain int so the load can be hoisted out
of the loop. Make it volatile.
Also check the cmdline_stdin_new() result before using it.
Found by gcc -fanalyzer.
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
examples/ethtool/ethtool-app/ethapp.c | 5 +++++
examples/ethtool/ethtool-app/main.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c
index 489cd4f515..68c8a29b96 100644
--- a/examples/ethtool/ethtool-app/ethapp.c
+++ b/examples/ethtool/ethtool-app/ethapp.c
@@ -5,4 +5,6 @@
#include <stdlib.h>
+#include <rte_debug.h>
+
#include <cmdline_parse.h>
#include <cmdline_parse_num.h>
@@ -915,4 +917,7 @@ void ethapp_main(void)
ctx_cmdline = cmdline_stdin_new(list_prompt_commands, "EthApp> ");
+ if (ctx_cmdline == NULL)
+ rte_panic("Cannot create cmdline instance\n");
+
cmdline_interact(ctx_cmdline);
cmdline_stdin_exit(ctx_cmdline);
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c
index b6bbae70d2..56fb48e03e 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -45,5 +45,5 @@ struct app_config {
struct app_port ports[MAX_PORTS];
int cnt_ports;
- int exit_now;
+ volatile int exit_now;
};
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:43.563686684 +0000
+++ 0151-examples-ethtool-fix-exit-flag.patch 2026-12-03 12:52:39.137890187 +0000
@@ -1 +1 @@
-From 1adec576ca04af651dd5043a34e9bc047eaeb2ef Mon Sep 17 00:00:00 2001
+From 33cc1c666d46ce666849538d7b8dc4acb20878ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1adec576ca04af651dd5043a34e9bc047eaeb2ef ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -44 +45 @@
-index 6545eb322d..ddd256cd7b 100644
+index b6bbae70d2..56fb48e03e 100644
More information about the stable
mailing list