From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 5603398 for ; Mon, 23 Jul 2018 12:12:33 +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 orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2018 03:12:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,393,1526367600"; d="scan'208,217";a="74683172" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga001.fm.intel.com with ESMTP; 23 Jul 2018 03:12:30 -0700 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX107.ger.corp.intel.com (163.33.3.99) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 23 Jul 2018 11:12:29 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.208]) by irsmsx112.ger.corp.intel.com ([169.254.1.22]) with mapi id 14.03.0319.002; Mon, 23 Jul 2018 11:12:29 +0100 From: "Singh, Jasvinder" To: Mordechay Haimovsky , "Pattan, Reshma" , "Dumitrescu, Cristian" CC: "dev@dpdk.org" Thread-Topic: commit 0ad778b39 (app/testpmd: rework softnic forward mode) compromises testpmd CLI Thread-Index: AdQh1JeNHBJrF2gmTWquayAjgMa4hgAmEchw Date: Mon, 23 Jul 2018 10:12:29 +0000 Message-ID: <54CBAA185211B4429112C315DA58FF6D335DBD55@IRSMSX103.ger.corp.intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzdmZGMyNjktMDkwMC00MzNhLTg3MDgtMThjYzg5MGU5NjJlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaFNUQ0xQTnRCWklwalN6cDZGR1JmN3IwSHJDbXZubDhrc1Z0UjQzMTdWak1NRWwwcUNsNmNoa0tpaFlWR3lmbSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [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: Mon, 23 Jul 2018 10:12:34 -0000 Hi Moti, I didn't know about Ctrl+D option to quit testpmd as I always used "quit= " on cli. Since Ctrl+D was working before this commit, I will send fix soon= to cover this case. Thanks, Jasvinder From: Mordechay Haimovsky [mailto:motih@mellanox.com] Sent: Sunday, July 22, 2018 5:04 PM To: Singh, Jasvinder ; Pattan, Reshma ; Dumitrescu, Cristian Cc: dev@dpdk.org Subject: commit 0ad778b39 (app/testpmd: rework softnic forward mode) compro= mises testpmd CLI 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.