From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 2EEB49E3 for ; Tue, 20 Jun 2017 14:30:15 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id m125so20615083wmm.1 for ; Tue, 20 Jun 2017 05:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=JIt+nscZoeM0MEyLnaP3+vDK5EAAr5CPQpOoGjdkVC8=; b=n6wseR2UpML+y+oWDkLzV/QtftFFDYTQFfElrrda7rfjZtcCYyHeqQYcbz4jncz4ww Fsp88mlQIXRvTy5wOHskE+Zxmr0bfqjn+KIkJowoWnI34E/YK3xn37rnUH11W0Bw6oMD hhFtTIMghmWPkSghCw9O6kITxwLhBaCn6X66gCZk5xiFwokxo0tvtjKc5s5khb5DKuQh a/FHVpDeRd+K1nyUgpliXSge4pW6vpiRbkEJ3HX3yvT1R7jJ+eh1DpS0zhtO3fmhFQxn m2Qfd+iKGY4sN0GDTeZS9KPVFWwsz/tbSPfcXJHGYZ7rgT9+tM4Ek1U+Cm1rbhd/+SKG LoXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=JIt+nscZoeM0MEyLnaP3+vDK5EAAr5CPQpOoGjdkVC8=; b=U5ycluCyG4sJke02Vz+XXvHqHTCRHoaMNzCKf8qUhJcn3zydZBiDbmhh5NX0STVTi9 N0+Tn/fkrWef5INhC4v78+5Z3BkY06hHGLospu21yxGyA6c01qNGQOv/w+z4NUWNInN9 9+0yHA3rXA3CQrMvvCeGdvXrIA3NiQQ2UjgJbjfF0xAbytAL6ZiemzC9L1U0huuWjRpJ POeCESVLuLxfJJom/BMJ0lDWWJsRODrhQ6yDGGMtezfjYsm9alda6I+8SGnexBqncrnv bj1aI6GDeGSA4m1lY5mZUClGN/TGq0Z1u0QxXw/wI6e1PpeuwilA50IHGyRsJ7ELZW17 XEmA== X-Gm-Message-State: AKS2vOwtGDbrDS5Sy1ZiWZwfxswKA+k9AVMFjs/hS8gFvyL/qxwK9UuH JkwxfnSMJqccan7Q X-Received: by 10.28.158.206 with SMTP id h197mr2508020wme.110.1497961814626; Tue, 20 Jun 2017 05:30:14 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id l129sm13161138wmb.17.2017.06.20.05.30.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 05:30:13 -0700 (PDT) Date: Tue, 20 Jun 2017 14:30:06 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Bruce Richardson Cc: Thomas Monjalon , "De Lara Guarch, Pablo" , dev@dpdk.org, "Wu, Jingjing" Message-ID: <20170620123006.GH29091@bidouze.vm.6wind.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> <20170620112033.GB39980@bricha3-MOBL3.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170620112033.GB39980@bricha3-MOBL3.ger.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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 12:30:15 -0000 On Tue, Jun 20, 2017 at 12:20:34PM +0100, Bruce Richardson wrote: > 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 Sure, but who are the users of testpmd, beside DPDK developers and integration bots? This fix IMO may be useful but it is a crutch for this usability problem. The aimed functionality would result in the end in adding one by one all interactive commands as parameters to have feature-parity between interactive and non-interactive mode. A better solution could be to open the cmdline from testpmd to a pipe when not in interactive mode, instead of relying on the user to do it artificially (as I was doing with my multiline shell command). Then the parameters could be restricted to configuration items that ought to be set before probing any device, instead of each possible elements being added twice in the cmdline and in the parameters. A kind of daemon / background mode if you want. Anyway, that's just my limited experience with integrating testpmd to a CI and using it, I reckon that it may not be the most common use, and I have no opinion regarding this parameter ; I only wanted to give my PoV. -- Gaëtan Rivet 6WIND