From: "Xueming(Steven) Li" <xuemingl@mellanox.com>
To: Olivier MATZ <olivier.matz@6wind.com>
Cc: Jingjing Wu <jingjing.wu@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/3] lib/cmdline: add echo support in batch loading from file
Date: Tue, 19 Dec 2017 11:20:03 +0000 [thread overview]
Message-ID: <AM0PR0502MB40687473398CF3A5CAF0098CAC0F0@AM0PR0502MB4068.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20171219103058.dhozknvb6x3sxzk4@glumotte.dev.6wind.com>
The idea of implementation in testpmd looks good, thanks!
Then I will combine all patches in v1 to avoid breaking build.
> -----Original Message-----
> From: Olivier MATZ [mailto:olivier.matz@6wind.com]
> Sent: Tuesday, December 19, 2017 6:31 PM
> To: Xueming(Steven) Li <xuemingl@mellanox.com>
> Cc: Jingjing Wu <jingjing.wu@intel.com>; dev@dpdk.org
> Subject: Re: [PATCH 1/3] lib/cmdline: add echo support in batch loading
> from file
>
> Hi Xueming,
>
> On Wed, Nov 15, 2017 at 11:45:43PM +0800, Xueming Li wrote:
> > Add echo option to echo commandline to screen when running loaded
> > scripts from file.
> >
> > Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> > ---
> > lib/librte_cmdline/cmdline_socket.c | 5 +++--
> > lib/librte_cmdline/cmdline_socket.h | 3 ++-
> > 2 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/lib/librte_cmdline/cmdline_socket.c
> > b/lib/librte_cmdline/cmdline_socket.c
> > index 3fc243b70..e57ddeffb 100644
> > --- a/lib/librte_cmdline/cmdline_socket.c
> > +++ b/lib/librte_cmdline/cmdline_socket.c
> > @@ -73,7 +73,8 @@
> > #include "cmdline.h"
> >
> > struct cmdline *
> > -cmdline_file_new(cmdline_parse_ctx_t *ctx, const char *prompt, const
> > char *path)
> > +cmdline_file_new(cmdline_parse_ctx_t *ctx, const char *prompt, const
> char *path,
> > + int echo)
> > {
> > int fd;
> >
> > @@ -86,7 +87,7 @@ cmdline_file_new(cmdline_parse_ctx_t *ctx, const char
> *prompt, const char *path)
> > dprintf("open() failed\n");
> > return NULL;
> > }
> > - return cmdline_new(ctx, prompt, fd, -1);
> > + return cmdline_new(ctx, prompt, fd, echo ? 1 : -1);
> > }
> >
> > struct cmdline *
> > diff --git a/lib/librte_cmdline/cmdline_socket.h
> > b/lib/librte_cmdline/cmdline_socket.h
> > index aa6068e7e..208134b12 100644
> > --- a/lib/librte_cmdline/cmdline_socket.h
> > +++ b/lib/librte_cmdline/cmdline_socket.h
> > @@ -68,7 +68,8 @@
> > extern "C" {
> > #endif
> >
> > -struct cmdline *cmdline_file_new(cmdline_parse_ctx_t *ctx, const char
> > *prompt, const char *path);
> > +struct cmdline *cmdline_file_new(cmdline_parse_ctx_t *ctx, const char
> *prompt,
> > + const char *path, int echo);
> > struct cmdline *cmdline_stdin_new(cmdline_parse_ctx_t *ctx, const
> > char *prompt); void cmdline_stdin_exit(struct cmdline *cl);
>
> This breaks the API and ABI.
> And it also breaks the compilation, because the modifications of
> applications are done in the next commits.
>
> You can send a deprecation notice, and this patch could be added in for
> 18.05.
>
> But instead, I suggest you to reimplement your own version of
> cmdline_file_new() with the echo feature inside testpmd.
next prev parent reply other threads:[~2017-12-19 11:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 15:45 [dpdk-dev] [PATCH 0/3] enable echo when CLI " Xueming Li
2017-11-15 15:45 ` [dpdk-dev] [PATCH 1/3] lib/cmdline: add echo support in batch " Xueming Li
2017-12-11 12:29 ` Burakov, Anatoly
2017-12-19 10:30 ` Olivier MATZ
2017-12-19 11:20 ` Xueming(Steven) Li [this message]
2017-12-26 14:25 ` [dpdk-dev] [PATCH v1] app/testpmd: support command echo in CLI batch loading Xueming Li
2018-01-10 8:35 ` Lu, Wenzhuo
2018-01-10 8:51 ` Xueming(Steven) Li
2018-01-10 12:25 ` Lu, Wenzhuo
2018-01-10 14:14 ` Xueming(Steven) Li
2017-11-15 15:45 ` [dpdk-dev] [PATCH 2/3] " Xueming Li
2017-12-11 12:36 ` Burakov, Anatoly
2017-11-15 15:45 ` [dpdk-dev] [PATCH 3/3] test: update batch loading test Xueming Li
2017-12-11 12:33 ` Burakov, Anatoly
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=AM0PR0502MB40687473398CF3A5CAF0098CAC0F0@AM0PR0502MB4068.eurprd05.prod.outlook.com \
--to=xuemingl@mellanox.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=olivier.matz@6wind.com \
/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).