From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50070.outbound.protection.outlook.com [40.107.5.70]) by dpdk.org (Postfix) with ESMTP id F2B0C98 for ; Wed, 25 Jul 2018 13:55:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FMtrzBgSZVZulkI/r2i/H7nI6hBnmbgzP60buW1zn4A=; b=eINv6rmrLbB+ZGiDm6OZi4zCMmwM1ZISq/MHhF0Rxbp5Bn8B+WU5RIKLaDno7cIKKYW2meosBv3/o6mvNtfC/vVI459zphogcArLNgWERpOc1xw3zU9cNrDQ0pE1zbjw8mO4uo+hPEJfxGcglxhj7UykYLm36AtGxfUYXKYUXAM= Received: from AM0PR05MB4435.eurprd05.prod.outlook.com (52.134.92.20) by AM0PR05MB4868.eurprd05.prod.outlook.com (20.177.41.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Wed, 25 Jul 2018 11:55:50 +0000 Received: from AM0PR05MB4435.eurprd05.prod.outlook.com ([fe80::74c6:6add:f439:ffd3]) by AM0PR05MB4435.eurprd05.prod.outlook.com ([fe80::74c6:6add:f439:ffd3%4]) with mapi id 15.20.0973.022; Wed, 25 Jul 2018 11:55:50 +0000 From: Mordechay Haimovsky To: Thomas Monjalon , "Singh, Jasvinder" CC: "dev@dpdk.org" , "Iremonger, Bernard" , "Pattan, Reshma" , "olivier.matz@6wind.com" , "Van Haaren, Harry" , "Ananyev, Konstantin" , "Dumitrescu, Cristian" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+d Thread-Index: AQHUInI9WfrVI52/I0681kO64dk53aSePSGAgAATHICAAB6SEIAAK6kAgAENnwCAAAjRAIAAIlwAgAAEEjA= Date: Wed, 25 Jul 2018 11:55:50 +0000 Message-ID: References: <20180723104425.10090-1-jasvinder.singh@intel.com> <1876510.4y0gDTZx5Q@xps> <1925999.Zqez9Xlb98@xps> <3EB4FA525960D640B5BDFFD6A3D891268E7792AF@IRSMSX107.ger.corp.intel.com> <2601191342CEEE43887BDE71AB977258DF51D3C1@irsmsx105.ger.corp.intel.com> <3EB4FA525960D640B5BDFFD6A3D891268E779722@IRSMSX107.ger.corp.intel.com> <2601191342CEEE43887BDE71AB977258DF51D5A2@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB977258DF51D5A2@irsmsx105.ger.corp.intel.com> Accept-Language: he-IL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=motih@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR05MB4868; 6:RULHu4YBw1teecTRcdTL8tHivfKnzzrQFc8g8q4FC8zImS410lKyXe5lFoGEWnc4ps7iB1oNqvApmr5Mse9QG6aeep+wlDQTU/aXvu8ydNnMB3LPxrRDobJhhWFQimT1xI175fRo9WY5gRcEtSutCXoO0vdKCeyztKR4W6w+ZvWqSvubTobRucF59f5QdMm/RYYVbJEQ9VHXj31XVx9962GruYNBaxBU8xBf+hSFSV1o0CbHgdLRaCdmsTWKdjlUcdtMO/CevdwUmmasArqPK+UoikoaJnT8Rm64VQal5U33SI4UvyaReWW+asKKOvAsiagF1X7eVVGQG4qNck4OdSOxMUcIrJVvnSXSCeU/1gowZpRUjUttFLuTrYjQHGR9xEQ4DSOBlYcQlD+qf6P67VoJlsJKriDXGyb2vEXjYKiRyHZqFmzD4ZAMgWVuphiMtL2/2T0LH10PjdH52v1JhA==; 5:MWAKXYmY4GWGoDxbuCmcvljEtr4bwvFAEUqfLTshqHf2OkjEo++7U6eqWoLtzjvscZtWpPpy8T7ZT3iJ/UBbCGyqyV9E852m0CZzV+LjLJIJlGUhpX3utLQSRTcEiN6U6zg0iELNoKhksL5BIcuyhqiuU9PNnzm72psqp7lczfI=; 7:AOMOT8fIsJsmCz5r1Ze54JjKni6iEqpKdtZw21/ItkwJ5jLlUrbjmIv9Osr0LcyMeNTT4MvFrOW+FripuS6VauJU5TEFXeK+8N3NUxt7Lws9AsdxNhVI0r+B885wTTNkAsPkrLTs6qtVNooy/g+SvDswwltE00eVa6WLO1FFlpXwdvdySb5m9/p5E7in1jXj2KMKy1J6IKF4FwpdvONf2TPHyhhwp4Ea47vt1uMWaF9Gzc/rKATaGuzYl8KSiSSl x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: a048306e-0127-44a4-1975-08d5f2259112 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:AM0PR05MB4868; x-ms-traffictypediagnostic: AM0PR05MB4868: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM0PR05MB4868; BCL:0; PCL:0; RULEID:; SRVR:AM0PR05MB4868; x-forefront-prvs: 0744CFB5E8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(346002)(376002)(136003)(396003)(13464003)(189003)(199004)(478600001)(53936002)(102836004)(25786009)(55016002)(53546011)(6506007)(76176011)(14444005)(256004)(7696005)(186003)(26005)(9686003)(93886005)(86362001)(6436002)(2906002)(476003)(486006)(33656002)(66066001)(4326008)(14454004)(229853002)(5660300001)(5250100002)(54906003)(97736004)(3846002)(110136005)(2900100001)(8936002)(6116002)(316002)(7736002)(105586002)(8676002)(74316002)(68736007)(305945005)(81166006)(99286004)(106356001)(6246003)(11346002)(81156014)(446003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB4868; H:AM0PR05MB4435.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: opi00tZ0rT+PDjsQ0mlbznbBwWl7QuJzReb3fTE9hz22UZcta10E1JQ9xvhmqsVtP0oa3WeK6ISCYr5zi7dTb6nuLRcbWzPPLtq2el2QtW8vQn71OKcqD5wJQZsXQIsn61Vp50slW027hxY4RQ8BL+qVVNujAF9hnlHVG4ZCouPSv6XMIn6JUnGNsHEEgJf8mZbhuDHr2JQQ3ixs3mgSCqKprOxaXNkmgCU/SUgwXpymhV7URuy9oGdhnDFu1HWz0edHFgH1Yfe6cA89t4hjFtfE5pcTZvwk0nIVuBzpQFXG+OtsWOmap4zsdCIrIB/rGRGx1Z/jGeZ/bqh9e0mZn0osd8LU3r/KtYj9/T3j4D8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: a048306e-0127-44a4-1975-08d5f2259112 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2018 11:55:50.3293 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4868 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 11:55:52 -0000 This is how we reproduce the issue : app/testpmd -n 4 --vdev=3D"net_tap0,iface=3Dtap0,remote=3Deth1" -- --bur= st=3D64 --mbcache=3D512 -i --rxq=3D2 --txq=3D2 --txd=3D512 --rxd=3D512 -= -port-topology=3Dchained --forward-mode=3Drxonly > -----Original Message----- > From: Ananyev, Konstantin [mailto:konstantin.ananyev@intel.com] > Sent: Wednesday, July 25, 2018 2:39 PM > To: Dumitrescu, Cristian ; Mordechay > Haimovsky ; Thomas Monjalon > ; Singh, Jasvinder > Cc: dev@dpdk.org; Iremonger, Bernard ; > Pattan, Reshma ; olivier.matz@6wind.com; Van > Haaren, Harry > Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using ctrl+= d >=20 >=20 >=20 > > -----Original Message----- > > From: Dumitrescu, Cristian > > Sent: Wednesday, July 25, 2018 10:36 AM > > To: Ananyev, Konstantin ; Mordechay > > Haimovsky ; Thomas Monjalon > ; > > Singh, Jasvinder > > Cc: dev@dpdk.org; Iremonger, Bernard ; > > Pattan, Reshma ; olivier.matz@6wind.com > > Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using > > ctrl+d > > > > > > > > > -----Original Message----- > > > From: Ananyev, Konstantin > > > Sent: Wednesday, July 25, 2018 10:04 AM > > > To: Dumitrescu, Cristian ; Mordechay > > > Haimovsky ; Thomas Monjalon > > > ; Singh, Jasvinder > > > Cc: dev@dpdk.org; Iremonger, Bernard > ; > > > Pattan, Reshma ; olivier.matz@6wind.com > > > Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit using > > > ctrl+d > > > > > > > > > > > > > -----Original Message----- > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Dumitrescu, > > > Cristian > > > > Sent: Tuesday, July 24, 2018 5:59 PM > > > > To: Mordechay Haimovsky ; Thomas Monjalon > > > ; Singh, Jasvinder > > > > > > > > Cc: dev@dpdk.org; Iremonger, Bernard > > > > ; > > > Pattan, Reshma ; > > > > olivier.matz@6wind.com > > > > Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd exit > > > > using ctrl+d > > > > > > > > > > > > > > > > > -----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 > > > > > > > > > > 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. > > > > > > > > > > > -----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 > > > ctrl+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 that it is breaking some automation scripts for some peopl= e. > > > > > > > > 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. > > > > > > Curious why not use a service core for softnic background stuff, and > > > leave CLI one for CLI? > > > Konstantin > > > > I guess for a test application you can do anything you want, but in > > real life CPU cores are really expensive and dedicating a CPU core just= for > CLI is a colossal waste. >=20 > Ok, but let's application developer to decide how to use (waste) the core= s he > owns :) What I am saying: there is a special thing (developed by Harry) > service cores. > As I understand why of it's the purpose - allow PMD(s) to allocate CPU > resources for there background tasks in a unified and transparent way. > From the description above - that seems to fit your needs (softnic > background processing), no? > Konstantin >=20 > > > > We did use the non-blocking cmdline_poll() function instead of the > > blocking cmdline_interact() in the past without any issues. The issues > > reported by Moti come as a surprise. It is probably good to see what th= is is > about and see if we can quickly fix the issue in cmdline library. Otherwi= se, we > can revert the usage of cmdline_poll() with cmdline_interact(). > > > > > > > > > > > > > > > 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.