From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 8D0CE9E3 for ; Tue, 20 Jun 2017 11:58:56 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1666A20A63; Tue, 20 Jun 2017 05:58:56 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 20 Jun 2017 05:58:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=6XFijEYU5uEk0Fe ZV2HiSOUeaywIKCT5p1Gd6dfO8Ck=; b=e3U8KmKC8In+1ZqZITnNUt9ISuHAIzV a3TWal707AtRy5hXMQ1hcgIS8NaiU5/Wt712TkkGN1jVdFwqmEKM3FwxMf4zQ0OJ 9lFxM0OI/OMG80kbm7JAcJs5TpRUpFO3fQwl9DxbsT+p52Sl+btxErg5QZnb/WTx CWvfnNMvzGLE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=6XFijEYU5uEk0FeZV2HiSOUeaywIKCT5p1Gd6dfO8Ck=; b=qn5Ep8wX AoXUzoWktBZib+ZLBA4L/iioXbwD4yx3C26mgKphgZ5aphZYM2uleiacYBU0llPA gxHWshwohdKjt2EYSjXlvFaiMc/EwHTOsrTCbJePiQEEJLz1ZVVXeXqdOnuNIA/q FTT1ob3UhL6JK23xwmEG/OuS23wT5kfvWA2MDna9gdAG2yUW1GLx0Ak3GQCuNQ15 wdtQZdokgN5Cpe8d7Qx1N6rt7qPPjeBcOlHXjvQFYLzpkR3VJjDQAqdpVlOBdgQn 356jIy8kemd0KG7a1pUYt717yibsm0vmZu7dCz4zUsDxHYm+sdo0U4WcGhrLCI92 omW0D49ASt7bTQ== X-ME-Sender: X-Sasl-enc: 5iAHI2ECLSQI09olMo7IEXha5BCJgnw99DtELLBCpaie 1497952735 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id BEC7924033; Tue, 20 Jun 2017 05:58:55 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson , "De Lara Guarch, Pablo" Cc: dev@dpdk.org, "Wu, Jingjing" Date: Tue, 20 Jun 2017 11:58:54 +0200 Message-ID: <3085290.YZ0U5LvfSW@xps> In-Reply-To: <20170620092239.GA39980@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> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 09:58:56 -0000 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. 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.