From: Bruce Richardson <bruce.richardson@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Ferruh Yigit <ferruh.yigit@amd.com>, <dev@dpdk.org>,
Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [PATCH v2] app/testpmd: show output of commands read from file
Date: Thu, 10 Oct 2024 10:46:47 +0100 [thread overview]
Message-ID: <ZweihyaOaku5am0s@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <CAJFAV8zDv=LAPCVGVn8pJq9Cdz-c5TS0yUeavFH6v_PwTjhfQA@mail.gmail.com>
On Thu, Oct 10, 2024 at 10:56:24AM +0200, David Marchand wrote:
> Hello Bruce, Ferruh,
>
> On Tue, Oct 8, 2024 at 3:33 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
> >
> > On 10/4/2024 5:56 AM, Ferruh Yigit wrote:
> > > On 8/22/2024 11:41 AM, Bruce Richardson wrote:
> > >> Testpmd supports the "--cmdline-file" parameter to read a set of initial
> > >> commands from a file. However, the only indication that this has been
> > >> done successfully on startup is a single-line message, no output from
> > >> the commands is seen.
> > >>
> > >> To improve usability here, we can use cmdline_new rather than
> > >> cmdline_file_new and have the output from the various commands sent to
> > >> stdout, allowing the user to see better what is happening.
> > >>
> > >> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > >>
> > >> ---
> > >> v2: use STDOUT_FILENO in place of hard-coded "1"
> > >> ---
> > >>
> > >
> > > After discussion, I think it is OK to have the update in the testpmd
> > > (instead of a new function in cmdline), hence;
> > >
> > > Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
> > Applied to dpdk-next-net/main, thanks.
>
> This patch triggers an error in UNH for Windows builds.
> Can you have a look?
>
> https://lab.dpdk.org/results/dashboard/testruns/logs/1386705/
>
Looks like I should have kept the hard-coded 1 after all! :-(
Anyway, something like this should fix the issue, I think:
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1fc1cce5fe..bfa0e77dce 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -68,6 +68,10 @@
#include "cmdline_tm.h"
#include "bpf_cmd.h"
+#ifndef STDOUT_FILENO
+#define STDOUT_FILENO _fileno(stdout)
+#endif
+
static struct cmdline *testpmd_cl;
static cmdline_parse_ctx_t *main_ctx;
static TAILQ_HEAD(, testpmd_driver_commands) driver_commands_head =
However, this is a fix only for this specific testpmd instance. I see that
unistd.h is present in "lib/eal/windows/include" in DPDK, so I'm thinking
maybe we add these macros there.
WDYT?
/Bruce
next prev parent reply other threads:[~2024-10-10 9:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 10:36 [PATCH] " Bruce Richardson
2024-08-22 10:41 ` [PATCH v2] " Bruce Richardson
2024-08-22 16:53 ` Ferruh Yigit
2024-08-22 17:14 ` Bruce Richardson
2024-08-22 17:18 ` Bruce Richardson
2024-08-22 21:09 ` Ferruh Yigit
2024-08-23 9:12 ` Bruce Richardson
2024-10-04 4:56 ` Ferruh Yigit
2024-10-08 1:33 ` Ferruh Yigit
2024-10-10 8:56 ` David Marchand
2024-10-10 9:46 ` Bruce Richardson [this message]
2024-10-04 4:55 ` [PATCH] " Ferruh Yigit
2024-10-04 4:56 ` Ferruh Yigit
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=ZweihyaOaku5am0s@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=thomas@monjalon.net \
/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).