patch 'app/pdump: fix variable shadowing' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:55:23 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.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 02/22/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/b4036181c6ce2260e32c94a5f90bed0552f6e5ba
Thanks.
Luca Boccassi
---
>From b4036181c6ce2260e32c94a5f90bed0552f6e5ba Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Wed, 14 Jan 2026 15:44:34 +0000
Subject: [PATCH] app/pdump: fix variable shadowing
[ upstream commit da33fbc6f344883b2970556ea34a256d410c92a3 ]
The variable name "optarg" is a standard global variable in getopt, so
use of that name for function parameters causes shadowing warnings.
Rename the variable to avoid these issues.
Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
app/pdump/main.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 49bac5025e..718d4be684 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -247,7 +247,7 @@ parse_uint_value(const char *key, const char *value, void *extra_args)
}
static int
-parse_pdump(const char *optarg)
+parse_pdump(const char *arg)
{
struct rte_kvargs *kvlist;
int ret = 0, cnt1, cnt2;
@@ -257,9 +257,9 @@ parse_pdump(const char *optarg)
pt = &pdump_t[num_tuples];
/* initial check for invalid arguments */
- kvlist = rte_kvargs_parse(optarg, valid_pdump_arguments);
+ kvlist = rte_kvargs_parse(arg, valid_pdump_arguments);
if (kvlist == NULL) {
- printf("--pdump=\"%s\": invalid argument passed\n", optarg);
+ printf("--pdump=\"%s\": invalid argument passed\n", arg);
return -1;
}
@@ -268,7 +268,7 @@ parse_pdump(const char *optarg)
cnt2 = rte_kvargs_count(kvlist, PDUMP_PCI_ARG);
if (!((cnt1 == 1 && cnt2 == 0) || (cnt1 == 0 && cnt2 == 1))) {
printf("--pdump=\"%s\": must have either port or "
- "device_id argument\n", optarg);
+ "device_id argument\n", arg);
ret = -1;
goto free_kvlist;
} else if (cnt1 == 1) {
@@ -290,7 +290,7 @@ parse_pdump(const char *optarg)
/* queue parsing and validation */
cnt1 = rte_kvargs_count(kvlist, PDUMP_QUEUE_ARG);
if (cnt1 != 1) {
- printf("--pdump=\"%s\": must have queue argument\n", optarg);
+ printf("--pdump=\"%s\": must have queue argument\n", arg);
ret = -1;
goto free_kvlist;
}
@@ -303,7 +303,7 @@ parse_pdump(const char *optarg)
cnt2 = rte_kvargs_count(kvlist, PDUMP_TX_DEV_ARG);
if (cnt1 == 0 && cnt2 == 0) {
printf("--pdump=\"%s\": must have either rx-dev or "
- "tx-dev argument\n", optarg);
+ "tx-dev argument\n", arg);
ret = -1;
goto free_kvlist;
} else if (cnt1 == 1 && cnt2 == 1) {
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:44.162775091 +0000
+++ 0021-app-pdump-fix-variable-shadowing.patch 2026-02-20 14:55:43.184190735 +0000
@@ -1 +1 @@
-From da33fbc6f344883b2970556ea34a256d410c92a3 Mon Sep 17 00:00:00 2001
+From b4036181c6ce2260e32c94a5f90bed0552f6e5ba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit da33fbc6f344883b2970556ea34a256d410c92a3 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 68bda487a7..1e62c8adc1 100644
+index 49bac5025e..718d4be684 100644
More information about the stable
mailing list