patch 'examples/ethtool: fix exit flag' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Oct 27 12:50:22 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/32a0b4acf3cb20152fd2f9ec4679518c1eb506ae
Thanks.
Luca Boccassi
---
>From 32a0b4acf3cb20152fd2f9ec4679518c1eb506ae 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 489cd4f515b..68c8a29b967 100644
--- a/examples/ethtool/ethtool-app/ethapp.c
+++ b/examples/ethtool/ethtool-app/ethapp.c
@@ -4,6 +4,8 @@
#include <stdlib.h>
+#include <rte_debug.h>
+
#include <cmdline_parse.h>
#include <cmdline_parse_num.h>
#include <cmdline_parse_string.h>
@@ -914,6 +916,9 @@ void ethapp_main(void)
struct cmdline *ctx_cmdline;
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 b6bbae70d29..56fb48e03e4 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -44,7 +44,7 @@ struct app_port {
struct app_config {
struct app_port ports[MAX_PORTS];
int cnt_ports;
- int exit_now;
+ volatile int exit_now;
};
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-10-27 11:43:58.647178681 +0000
+++ 0128-examples-ethtool-fix-exit-flag.patch 2026-10-27 11:43:53.654063782 +0000
@@ -1 +1 @@
-From 1adec576ca04af651dd5043a34e9bc047eaeb2ef Mon Sep 17 00:00:00 2001
+From 32a0b4acf3cb20152fd2f9ec4679518c1eb506ae Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1adec576ca04af651dd5043a34e9bc047eaeb2ef ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 489cd4f515..68c8a29b96 100644
+index 489cd4f515b..68c8a29b967 100644
@@ -48 +49 @@
-index 6545eb322d..ddd256cd7b 100644
+index b6bbae70d29..56fb48e03e4 100644
More information about the stable
mailing list