From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>, stable@dpdk.org
Subject: [PATCH 1/2] app/pdump: remove hard-coded memory channels EAL arg
Date: Fri, 17 Oct 2025 12:06:36 +0100 [thread overview]
Message-ID: <20251017110638.1094371-1-bruce.richardson@intel.com> (raw)
The pdump main function modifies argc/argv before calling EAL init
function. It needs to do so in order to add the proc-type=secondary
flag, but also adds in "-n4" as parameter. This parameter is unnecessary
and also causes duplicate parameter errors if the user also passes in -n
flag on the commandline. Just remove this flag.
Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/pdump/main.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index fa85859703..f3ac81cb80 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -982,9 +982,8 @@ main(int argc, char **argv)
int ret;
int i;
- char n_flag[] = "-n4";
char mp_flag[] = "--proc-type=secondary";
- char *argp[argc + 2];
+ char *argp[argc + 1];
/* catch ctrl-c so we can cleanup on exit */
sigemptyset(&action.sa_mask);
@@ -996,13 +995,12 @@ main(int argc, char **argv)
sigaction(SIGHUP, &action, NULL);
argp[0] = argv[0];
- argp[1] = n_flag;
- argp[2] = mp_flag;
+ argp[1] = mp_flag;
for (i = 1; i < argc; i++)
- argp[i + 2] = argv[i];
+ argp[i + 1] = argv[i];
- argc += 2;
+ argc += 1;
diag = rte_eal_init(argc, argp);
if (diag < 0)
@@ -1012,7 +1010,7 @@ main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
argc -= diag;
- argv += (diag - 2);
+ argv += (diag - 1);
/* parse app arguments */
if (argc > 1) {
--
2.48.1
next reply other threads:[~2025-10-17 11:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 11:06 Bruce Richardson [this message]
2025-10-17 11:06 ` [PATCH 2/2] app/pdump: improve cmdline argument handling Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251017110638.1094371-1-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).