From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70084.outbound.protection.outlook.com [40.107.7.84]) by dpdk.org (Postfix) with ESMTP id BEC9A1B53 for ; Sun, 22 Jul 2018 18:03:41 +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=Vo1zzfjSMT/Uwb/ea40ATKDYI1wmoI62TkKX3/SjTnc=; b=bx9stkmV96lyIBR7B7J6sfeNEqZr0ms0WGxqk1Il4uS5IXVkXwTEjzXEPQYsF9Peaa59T0NSDF0Gc7n5zCnHtSTruJuTV+iMrQjgLMOYg0izAuPEi1S0p2KToyDFay/Oyk9z93HioBaRcEZVzY9P7bfx7AQ50rMKB5+XscvvClc= Received: from AM0PR05MB4435.eurprd05.prod.outlook.com (52.134.92.20) by AM0PR05MB4436.eurprd05.prod.outlook.com (52.134.92.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.20; Sun, 22 Jul 2018 16:03:39 +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.018; Sun, 22 Jul 2018 16:03:39 +0000 From: Mordechay Haimovsky To: "jasvinder.singh@intel.com" , "reshma.pattan@intel.com" , "cristian.dumitrescu@intel.com" CC: "dev@dpdk.org" Thread-Topic: commit 0ad778b39 (app/testpmd: rework softnic forward mode) compromises testpmd CLI Thread-Index: AdQh1JeNHBJrF2gmTWquayAjgMa4hg== Date: Sun, 22 Jul 2018 16:03:39 +0000 Message-ID: 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: [109.66.56.208] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR05MB4436; 6:78vkPJEI/YB8rYpUL6wr/anB0aLPJz9y1pxQo3tk3iV9yae7YnOnm+/DOdTQSvMwjOUVrzlf8Z3Qv8lRK9pMD6tbZN5dz6S13amUmBNldskW3pP2udGclReH0Z3cuKboGqRf9RFvX4BqVPYu6py2JNNrvhDej2EeD2o3cir3eRcwTNOmRxgNAR/KAhsD9sY7NYuCYNwltmGLsC3FV5iCPndvXbA6Vj9iaynuyd4AKUN6dqxy/51UzEWtqAofptYZxh+Ssa+kaAiCwNMquICscf2Ce2QSFi/B8cwNop1QdpChCh225zxBA2nLxb4A2lpmbN627gMoogtFU6OT3dnuh6wAkbhtIMQfNoIA9vSqiKspceOGH7qazsrh5N3kZQ+vfvKUbHJ8tAsXGwYcfCIA6lgQBlcoeaZEsGkWSkS6huLTyd4vrYmJDhmS9+4jWWGNp6IQY4hvVJjZslCOJpkSLw==; 5:5D4N+r8W7WLN2w5eEIxDoFzcWUzdOEFfS26n9vs8IOnX7wbpCk3sdYZLQhKX3dKk34i/LKP9ZP3TJ8pC8v8druF96vwEzxY4uC7fKg9bXsLlKT8ABRnqnGGfx0rQMcUSCbj52jGL/7aq4C1dJeWlEJvNMP3M6Ja+r/OJLdvHRoo=; 7:Vwe4h3tYC1tRM3AVMtiDZnFSWInAmMI4GmsDqLWmbd4RZvzvvojGLqj+dAQG8SnRj7MlR3BDjBCphD4s+ACuYSe6je8+6029i0mtKnOPFAMjc+RWI9uG4rOZz+F+tMpmNjIEWcuKcTOTyK/9kO1L0YmY0/G8iofYbCs4z8KAqEAENbVGoiazKSEeURW8fuaVrQg0PuoOTzhy/7Hxg3W8zNkIj9hsKbokFPaY8dwSZxRFqrE+n7GPcTwbapsgpqdc x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: bc1722ef-cad5-449a-d683-08d5efecb0ac 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:AM0PR05MB4436; x-ms-traffictypediagnostic: AM0PR05MB4436: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(21748063052155); 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)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM0PR05MB4436; BCL:0; PCL:0; RULEID:; SRVR:AM0PR05MB4436; x-forefront-prvs: 0741C77572 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(366004)(346002)(396003)(136003)(39860400002)(189003)(199004)(53936002)(6506007)(7696005)(5250100002)(6306002)(2900100001)(54896002)(26005)(14454004)(2201001)(68736007)(8676002)(2501003)(86362001)(186003)(106356001)(9686003)(99286004)(476003)(105586002)(97736004)(256004)(102836004)(81156014)(486006)(74316002)(4326008)(33656002)(2906002)(110136005)(316002)(66066001)(6436002)(9326002)(478600001)(81166006)(7736002)(55016002)(25786009)(5660300001)(6116002)(790700001)(3846002)(8936002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB4436; 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: KCqy3VInK7qQZAL1aN7O6UOZwP/O0K1tqAbTPw6WW8S7NBq/VJD1vrTMmMTGiSRaSzdkl9U4oJrZveZxAa/w0hiQOJlwwMlnQ3CEzjtwAiNwMsjrpPwOJ1Hfu8Nyvg5tWBm2ONGyL8VXsEBAgMuo1w0Q/TFaSv4AeFoxL9dpY6Ep/QRPX9rF2cYsFiWsbkBQzqa9A+M5gMPmdUhkpBWtgIr/ZOYVke7CcKoQUN5p3kO11JQ+b9PcE4aiSk4j//t/aKe5X968/Ci0j2kUhDZogiX2HyTrpnOebG8PHDBjRLVaMnaxm+/gA2lPINOsLfJEa/abd8qJ/gyJkcipLj8ZQZpGtBuHUaIJi3l7t8CMegg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc1722ef-cad5-449a-d683-08d5efecb0ac X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2018 16:03:39.6980 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4436 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] commit 0ad778b39 (app/testpmd: rework softnic forward mode) compromises testpmd CLI 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: Sun, 22 Jul 2018 16:03:42 -0000 Hi, When starting testpmd after applying the above patch and pressing CTRL+D in= the command prompts, testpmd exits abnormally Whit the following message : PANIC in prompt(): CLI poll error (-1) And a dump trace is displayed. Issue is traced to the following section in your commit: - cmdline_interact(testpmd_cl); - cmdline_stdin_exit(testpmd_cl); + + for (;;) { + status =3D cmdline_poll(testpmd_cl); + if (status < 0) + rte_panic("CLI poll error (%" PRId32 ")\n", status)= ; + else if (status =3D=3D RDLINE_EXITED) { + cmdline_stdin_exit(testpmd_cl); + rte_exit(0, "\n"); + } Which did not take into consideration the case of user pressing CTRL+D on a= n empty command line which returns -1 from cmdline_poll. Please advise on a fix. Thanks Moti H.