From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 5116A98 for ; Tue, 24 Jul 2018 17:31:20 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 08:31:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,398,1526367600"; d="scan'208";a="75512831" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga001.jf.intel.com with ESMTP; 24 Jul 2018 08:31:10 -0700 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 24 Jul 2018 16:31:09 +0100 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.193]) by irsmsx112.ger.corp.intel.com ([169.254.1.22]) with mapi id 14.03.0319.002; Tue, 24 Jul 2018 16:31:09 +0100 From: "Iremonger, Bernard" To: "Pattan, Reshma" , "dev@dpdk.org" CC: "thomas@monjalon.net" , "Singh, Jasvinder" , "olivier.matz@6wind.com" , Mordechay Haimovsky Thread-Topic: [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d Thread-Index: AQHUI1kkAeq5/dLJVU+KaGhItxz4j6SeYuIAgAAcoHA= Date: Tue, 24 Jul 2018 15:31:08 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260CCEFB7@IRSMSX107.ger.corp.intel.com> References: <20180723104425.10090-1-jasvinder.singh@intel.com> <1532441847-7492-1-git-send-email-reshma.pattan@intel.com> <3AEA2BF9852C6F48A459DA490692831F2A37617A@IRSMSX109.ger.corp.intel.com> In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F2A37617A@IRSMSX109.ger.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTNlYmIxMmYtYjNjOS00MjI1LWJiMzEtNzVlNjg3YjkwZjU4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUUlcL2FcLzBWbHlVTGpTOXBuMDJXdm1GZEZLODJ2dmg0a3ErSTdYV1UrSUZTeGFlQ050MlViRVpXeldvNjZNUDhBIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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 v2] app/testpmd: fix testpmd exit for 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 15:31:22 -0000 Hi Reshma, > -----Original Message----- > From: Pattan, Reshma > Sent: Tuesday, July 24, 2018 3:47 PM > To: dev@dpdk.org > Cc: Iremonger, Bernard ; > thomas@monjalon.net; Singh, Jasvinder ; > olivier.matz@6wind.com; Mordechay Haimovsky > Subject: RE: [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d >=20 > + CC: Olivier and Mordechay Haimovsky. >=20 > > -----Original Message----- > > From: Pattan, Reshma > > Sent: Tuesday, July 24, 2018 3:17 PM > > To: dev@dpdk.org > > Cc: Iremonger, Bernard ; > > thomas@monjalon.net; Singh, Jasvinder ; > > Pattan, Reshma > > Subject: [PATCH v2] app/testpmd: fix testpmd exit for ctrl+d > > > > Testpmd should be existed gracefully when ctrl+d is typed. Typo in commit message: "should be existed" should be "should exit" > > This behaviour is not handled properly, fix this by calling > > pmd_test_exit() instead of rte_panic. > > > > Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode") > > > > Reported-by: Mordechay Haimovsky > > Signed-off-by: Jasvinder Singh > > Signed-off-by: Reshma Pattan > > --- > > v2: removed changes done to lib/librte_cmdline/cmdline.c reworded > > commit message and heading. > > --- > > app/test-pmd/cmdline.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > > 588528928..406008d73 100644 > > --- a/app/test-pmd/cmdline.c > > +++ b/app/test-pmd/cmdline.c > > @@ -17581,9 +17581,9 @@ prompt(void) > > > > 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) { > > + if (status =3D=3D RDLINE_EXITED || status =3D=3D -1) { > > + if (status =3D=3D -1) > > + pmd_test_exit(); > > cmdline_stdin_exit(testpmd_cl); > > rte_exit(0, "\n"); > > } > > -- > > 2.14.4 Regards, Bernard.