From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C5FAE2C72 for ; Tue, 20 Jun 2017 13:20:38 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2017 04:20:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,364,1493708400"; d="scan'208";a="117073871" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.28]) by fmsmga006.fm.intel.com with SMTP; 20 Jun 2017 04:20:34 -0700 Received: by (sSMTP sendmail emulation); Tue, 20 Jun 2017 12:20:34 +0100 Date: Tue, 20 Jun 2017 12:20:34 +0100 From: Bruce Richardson To: =?iso-8859-1?Q?Ga=EBtan?= Rivet Cc: Thomas Monjalon , "De Lara Guarch, Pablo" , dev@dpdk.org, "Wu, Jingjing" Message-ID: <20170620112033.GB39980@bricha3-MOBL3.ger.corp.intel.com> References: <20170609023044.75127-1-pablo.de.lara.guarch@intel.com> <2741486.Oz5ccjHQup@xps> <20170620092239.GA39980@bricha3-MOBL3.ger.corp.intel.com> <3085290.YZ0U5LvfSW@xps> <20170620101901.GG29091@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170620101901.GG29091@bidouze.vm.6wind.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.1 (2017-04-11) Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: add parameter to start forwarding TX first X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 11:20:39 -0000 On Tue, Jun 20, 2017 at 12:19:01PM +0200, Gaëtan Rivet wrote: > 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 > > > > > > --- > > > > > > --- 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. > Or we can just put in a --tx-first flag and save the user the pain of doing multi-line bash commands. Usability is a constant complaint about DPDK that we hear e.g. at userspace every year, so we need to stop assuming everyone looking to play with DPDK is a shell power-user. /Bruce