From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, stephen@networkplumber.org,
andremue@linux.microsoft.com,
Aman Singh <aman.deep.singh@intel.com>
Subject: Re: [PATCH v4 2/4] app/testpmd: explicitly set command echoing on file load
Date: Wed, 15 Oct 2025 14:45:55 +0200 [thread overview]
Message-ID: <2863857.3ZeAukHxDK@thomas> (raw)
In-Reply-To: <20250731160041.914837-3-bruce.richardson@intel.com>
31/07/2025 18:00, Bruce Richardson:
> The echoing of commands contained in a file loaded via the "load"
> command on testpmd CLI is governed by whether or not a cmdline-file or
> cmdline-file-noecho had been passed to testpmd on the commandline.
>
> Remove the use of a global setting for this, and explicitly add a
> "load_echo" command to match the "load" command.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
[...]
> @@ -11646,7 +11646,9 @@ cmd_load_from_file_parsed(
> {
> struct cmd_cmdfile_result *res = parsed_result;
>
> - cmdline_read_from_file(res->filename);
> + if (cmdline_read_from_file(res->filename, false) != 0) {
> + fprintf(stderr, "Failed to load commands from file: %s\n", res->filename);
> + }
> }
> +static void
> +cmd_load_echo_file_parsed(
> + void *parsed_result,
> + __rte_unused struct cmdline *cl,
> + __rte_unused void *data)
> +{
> + struct cmd_load_echo_result *res = parsed_result;
> +
> + if (cmdline_read_from_file(res->filename, true) != 0)
> + fprintf(stderr, "Failed to load commands from file: %s\n", res->filename);
> +}
These 2 functions cmd_load_from_file_parsed()
and cmd_load_echo_file_parsed() could be merged
in a single function by passing the echo boolean as callback data.
next prev parent reply other threads:[~2025-10-15 12:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 14:05 [PATCH] app/testpmd: allow multiple cmdline-file parameters Bruce Richardson
2025-07-04 18:34 ` [PATCH v2 0/3] improve cmdline file handling in testpmd Bruce Richardson
2025-07-04 18:34 ` [PATCH v2 1/3] app/testpmd: explicitly set command echoing on file load Bruce Richardson
2025-07-04 18:34 ` [PATCH v2 2/3] app/testpmd: allow multiple commandline file parameters Bruce Richardson
2025-07-04 18:34 ` [PATCH v2 3/3] app/testpmd: improve output when processing cmdline files Bruce Richardson
2025-07-07 11:17 ` [PATCH v3 0/3] improve cmdline file handling in testpmd Bruce Richardson
2025-07-07 11:17 ` [PATCH v3 1/3] app/testpmd: explicitly set command echoing on file load Bruce Richardson
2025-07-07 11:17 ` [PATCH v3 2/3] app/testpmd: allow multiple commandline file parameters Bruce Richardson
2025-07-07 11:17 ` [PATCH v3 3/3] app/testpmd: improve output when processing cmdline files Bruce Richardson
2025-07-29 4:24 ` Stephen Hemminger
2025-07-31 16:00 ` [PATCH v4 0/4] improve cmdline file handling in testpmd Bruce Richardson
2025-07-31 16:00 ` [PATCH v4 1/4] eal: add basename function for common path manipulation Bruce Richardson
2025-08-01 14:25 ` Andre Muezerie
2025-08-01 21:56 ` Stephen Hemminger
2025-08-05 8:11 ` Bruce Richardson
2025-08-06 13:40 ` Bruce Richardson
2025-07-31 16:00 ` [PATCH v4 2/4] app/testpmd: explicitly set command echoing on file load Bruce Richardson
2025-10-15 12:45 ` Thomas Monjalon [this message]
2025-07-31 16:00 ` [PATCH v4 3/4] app/testpmd: allow multiple commandline file parameters Bruce Richardson
2025-10-15 12:51 ` Thomas Monjalon
2025-07-31 16:00 ` [PATCH v4 4/4] app/testpmd: improve output when processing cmdline files Bruce Richardson
2025-10-15 13:42 ` [PATCH v4 0/4] improve cmdline file handling in testpmd Thomas Monjalon
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=2863857.3ZeAukHxDK@thomas \
--to=thomas@monjalon.net \
--cc=aman.deep.singh@intel.com \
--cc=andremue@linux.microsoft.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.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).