From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 14DC525D9 for ; Wed, 25 Jul 2018 10:18:54 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8B3CE21B1B; Wed, 25 Jul 2018 04:18:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 25 Jul 2018 04:18:54 -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; s=mesmtp; bh=QDIkZPeyRnmxh3oFTAbfqKXi2o pOQO/+SE3+emPWzLA=; b=ImeYrwWzoLrUy9bEQnqNmPk07LPxwUAXANCiZNobBh fcZdgQg+JEf/yQnXnsGjJOHH4MVYi0fMWmg/YPpNijmy1DSdY1sJD3pj3JFM+zhS cdeRi2mbe8yswMvDcJcW+nhBnJdUNCMWwi84fx8f7xwwFiIdSrouxUFY2lJrUJmK s= 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; s=fm3; bh=QDIkZP eyRnmxh3oFTAbfqKXi2opOQO/+SE3+emPWzLA=; b=TtjzevbhWA69N6iQ+8WbLa awjIopf49k51bCoi2gddDa+KgzEEKwOIF+GR8GCl+U23J5ZC0eqXsvyMaLPGVh5G A9u7yxAUX23eXzIX0q3KDE9NkmbTFIXvuf8p0VnC+nbHVTiR7imE6IKpb86HdS5j AlikNvPYcKTCQVbenJJRZl3ba78pxsf/AI4kPsMKWK11BECQtWnBzq4rDtW1UWuK AXH1hf5vokyVhKY3jDAUfnPQ7JdEekv5gPZk3ApcZIBSK7Zir95A6Q88tSc7WU56 Gn0l9JWiv3VclZV3cMNKeNsHyG/oxIy7ul23ZzlGjuQD4IfNIIaB2y17q9fyPVig == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 55F2F1025D; Wed, 25 Jul 2018 04:18:52 -0400 (EDT) From: Thomas Monjalon To: "Dumitrescu, Cristian" Cc: dev@dpdk.org, Mordechay Haimovsky , "Singh, Jasvinder" , "Iremonger, Bernard" , "Pattan, Reshma" , "olivier.matz@6wind.com" Date: Wed, 25 Jul 2018 10:18:47 +0200 Message-ID: <1707406.j7eEjrHijo@xps> In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891268E7792AF@IRSMSX107.ger.corp.intel.com> References: <20180723104425.10090-1-jasvinder.singh@intel.com> <3EB4FA525960D640B5BDFFD6A3D891268E7792AF@IRSMSX107.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Wed, 25 Jul 2018 08:18:55 -0000 24/07/2018 18:59, Dumitrescu, Cristian: > From: Mordechay Haimovsky [mailto:motih@mellanox.com] > > > > Even after this fix we still have setups that use netvsc for example, on > > which testpmd exits with rte_panic right after loading it even without > > touching the KBD. > > > > 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-specific > > implementation. > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > > > Important note: > > > testpmd is currently really broken. > > > We cannot have a RC2 until it is fixed. > > > > > 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 that 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 approaches 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 it looks like something else needs to be fixed in cmdline library in order to bring cmdline_poll() on parity with cmdline_interact(). Any advice from Olivier 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 runs the CLI. Sometimes we need to run other things on the same core, e.g. the slow softnic_manage() function. > > Worst case scenario: We can revert the cmdline_poll() back to cmdline_interact(), this is a small change, but not the proper way of doing things, as this is simply hiding the issue in cmdline library. It would also prevent us from testing some Soft NIC functionality. There are some crashes, even without touching the keyboard. So yes, we should revert.