DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "Gaëtan Rivet" <gaetan.rivet@6wind.com>,
	"Thomas Monjalon" <thomas@monjalon.net>
Cc: "Richardson, Bruce" <bruce.richardson@intel.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Wu, Jingjing" <jingjing.wu@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: add parameter to start forwarding TX first
Date: Tue, 20 Jun 2017 10:27:14 +0000	[thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA640C2F914@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <20170620101901.GG29091@bidouze.vm.6wind.com>

> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Gaëtan Rivet
> Sent: Tuesday, June 20, 2017 11:19 AM
> To: Thomas Monjalon <thomas@monjalon.net>
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: add parameter to start forwarding TX first
> 
> On Tue, Jun 20, 2017 at 11:58:54AM +0200, Thomas Monjalon wrote:
> > 20/06/2017 11:22, Bruce Richardson:
> > > On Mon, Jun 19, 2017 at 11:12:53PM +0200, Thomas Monjalon wrote:
> > > > 15/06/2017 14:05, De Lara Guarch, Pablo:
> > > > > > Add parameter to start forwarding sending first
> > > > > > a burst of packets, which is useful when testing
> > > > > > a loopback connection.
> > > > > >
> > > > > > This was already implemented as an internal command,
> > > > > > but adding it as a parameter is interesting, as it
> > > > > > allows the user to test a loopback connection without
> > > > > > entering in the internal command line.
> > > > > >
> > > > > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > > > > > ---
> > > > > > --- a/doc/guides/testpmd_app_ug/run_app.rst
> > > > > > +++ b/doc/guides/testpmd_app_ug/run_app.rst
> > > > > > @@ -188,6 +188,14 @@ The commandline options are:
> > > > > >
> > > > > >      Start forwarding on initialization.
> > > > > >
> > > > > > +*   ``--tx-first``
> > > > > > +
> > > > > > +    Start forwarding, after sending a burst of packets first.
> > > > > > +
> > > > > > +.. Note::
> > > > > > +
> > > > > > +   This flag should be only used in non-interactive mode.
> > > >
> > > > I don't really understand the benefit of this option.
> > > > Why is it better than
> > > > 	echo start tx_first | testpmd -i
> > > > ?
> > >
> > > The one big difference I see is normal vs abnormal termination. With the
> > > echo command you suggest, the only way to terminate testpmd is to kill
> > > it via signal. With the extra cmdline option, it will cleanly exit via
> > > enter as with non-interactive mode right now. Not a huge difference, but
> > > I think having the extra argument to enable tx-first is useful.
> 
> Side note, one can:
> 
> (trap 'echo quit' SIGUSR1; echo 'start'; while true; do sleep 1; done) |testpmd -i &
> 
> and issue a SIGUSR1 to the subshell to cleanly quit testpmd.
> Or:
> 
> (trap 'echo show port stats all' SIGUSR1; \
>  trap 'echo quit' SIGUSR2; \
>  echo 'start'; \
>  while true; do :; done) |\
> testpmd -i &
> 
> It's a little contrived, but it does the job and is easy enough to put
> in scripts.
> 
> For automated testing, what I did was open a pipe to testpmd to issue
> commands from wherever, allowing to keep testpmd running in the
> background and dispatch commands when needed from other terminals. No
> need to issue signals at all then.

In an expert-user automated testing environment this is a solution yes..


> > I do not see a big difference between "enter" and "ctrl+c".
> >
> > I think it is more flexible to pipe commands instead of options.
> > We could combine the proposed options --tx-first and -T into this command:
> > ( echo 'start tx_first' ; while true ; do echo 'show port stats all' ; sleep 1 ; done ) |
> testpmd -i
> >
> > It is even possible to add more actions in the loop, so it is less
> > limited than the -T options.
> >
> > It is a matter of deciding whether we prefer to implement more restricted
> > options or leverage the shell to freely program non-interactive testpmd.


Lets keep in mind the beginner users, who probably don't have a traffic generator machine, perhaps just 2 ports and a loopback cable. IMO running   ./testpmd -- --tx-first   is the easiest way to learn to run traffic using testpmd, instead of various shell tricks to work-around a missing CLI flag?

A +1 from me to add   --tx-first  to the CLI, -Harry

  reply	other threads:[~2017-06-20 10:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28 21:36 [dpdk-dev] [PATCH] app/testpmd: add parameter to start forwarding sending Pablo de Lara
2017-06-07  9:17 ` Wu, Jingjing
2017-06-07 13:20   ` De Lara Guarch, Pablo
2017-06-07 13:23     ` Bruce Richardson
2017-06-09  2:30 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2017-06-15  4:04   ` [dpdk-dev] [PATCH v3] app/testpmd: add parameter to start forwarding TX first Pablo de Lara
2017-06-15 12:05     ` De Lara Guarch, Pablo
2017-06-19  1:05       ` Wu, Jingjing
2017-07-05 23:48         ` Thomas Monjalon
2017-06-19 21:12       ` Thomas Monjalon
2017-06-20  8:03         ` De Lara Guarch, Pablo
2017-06-20  9:22         ` Bruce Richardson
2017-06-20  9:58           ` Thomas Monjalon
2017-06-20 10:19             ` Gaëtan Rivet
2017-06-20 10:27               ` Van Haaren, Harry [this message]
2017-06-20 11:20               ` Bruce Richardson
2017-06-20 12:30                 ` Gaëtan Rivet
2017-06-19  0:53   ` [dpdk-dev] [PATCH v2] app/testpmd: add parameter to start forwarding sending Wu, Jingjing

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=E923DB57A917B54B9182A2E928D00FA640C2F914@IRSMSX102.ger.corp.intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gaetan.rivet@6wind.com \
    --cc=jingjing.wu@intel.com \
    --cc=pablo.de.lara.guarch@intel.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).