From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id C4025160 for ; Tue, 24 Jul 2018 18:59:31 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 09:59:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,398,1526367600"; d="scan'208";a="75102535" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by fmsmga001.fm.intel.com with ESMTP; 24 Jul 2018 09:59:29 -0700 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.193]) by IRSMSX108.ger.corp.intel.com ([169.254.11.169]) with mapi id 14.03.0319.002; Tue, 24 Jul 2018 17:59:28 +0100 From: "Dumitrescu, Cristian" To: Mordechay Haimovsky , Thomas Monjalon , "Singh, Jasvinder" CC: "dev@dpdk.org" , "Iremonger, Bernard" , "Pattan, Reshma" , "olivier.matz@6wind.com" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d Thread-Index: AQHUInJOmSIrvnKxS0eFgvH0FQENVqSeLF2AgAATHYCAACKJAIAAMx8Q Date: Tue, 24 Jul 2018 16:59:28 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891268E7792AF@IRSMSX107.ger.corp.intel.com> References: <20180723104425.10090-1-jasvinder.singh@intel.com> <1876510.4y0gDTZx5Q@xps> <1925999.Zqez9Xlb98@xps> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d 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, 24 Jul 2018 16:59:32 -0000 > -----Original Message----- > From: Mordechay Haimovsky [mailto:motih@mellanox.com] > Sent: Tuesday, July 24, 2018 3:37 PM > To: Thomas Monjalon ; Singh, Jasvinder > > Cc: dev@dpdk.org; Iremonger, Bernard ; > Pattan, Reshma ; olivier.matz@6wind.com; > Dumitrescu, Cristian > Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+= d >=20 > Even after this fix we still have setups that use netvsc for example, o= n > which testpmd exits with rte_panic right after loading it even without > touching the KBD. >=20 > I recommend returning the previous prompt routine in test-pmd/cmdline.c > and rework the SOFTNIC section there, preferably moving its poll section = to > use rte_service in a separate file cleaning the CLI files from PMD-specif= ic > implementation. >=20 > > -----Original Message----- > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > Sent: Tuesday, July 24, 2018 3:34 PM > > To: Jasvinder Singh > > Cc: dev@dpdk.org; bernard.iremonger@intel.com; > > reshma.pattan@intel.com; Mordechay Haimovsky > ; > > olivier.matz@6wind.com; cristian.dumitrescu@intel.com > > Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctr= l+d > > > > Important note: > > testpmd is currently really broken. > > We cannot have a RC2 until it is fixed. > > > > > > 24/07/2018 13:25, Thomas Monjalon: > > > 23/07/2018 12:44, Jasvinder Singh: > > > > Fix testpmd app exit by pressing ctrl+d, End-of-Transmission > > > > character (EOT) on the empty command line. > > > > > > Please describe what is the issue and what is the cause. > > > > > > > Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode") > > > > > > > > Reported-by: Mordechay Haimovsky > > > > Signed-off-by: Jasvinder Singh > > > > --- > > > > app/test-pmd/cmdline.c | 10 ++++++---- > > > > lib/librte_cmdline/cmdline.c | 2 +- > > > > > > It is very suspicious to change the cmdline library. > > > If there is a bug in this library, it deserves a separate fix. > > > > First, testpmd is not really broken, as only thing that changed is the Ctrl= + D behavior. I agree this is an issue that we need to fix, as it looks th= at it is breaking some automation scripts for some people. The change in behavior for Ctrl + D exit is caused by replacing the call to= cmdline_interact() with calling cmdline_poll() in a loop. These two approa= ches should be identical in behavior, but it looks like they are not due to= some issue in the cmdline library. Jasvinder proposed a quick patch, but i= t looks like something else needs to be fixed in cmdline library in order t= o bring cmdline_poll() on parity with cmdline_interact(). Any advice from O= livier would be very much appreciated! It is really a bad practice to use cmdline_interact() in testpmd, as it is = a blocking call that prohibits doing other things on the same thread that r= uns the CLI. Sometimes we need to run other things on the same core, e.g. t= he slow softnic_manage() function. Worst case scenario: We can revert the cmdline_poll() back to cmdline_inter= act(), this is a small change, but not the proper way of doing things, as t= his is simply hiding the issue in cmdline library. It would also prevent us= from testing some Soft NIC functionality.