From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 880B8239 for ; Tue, 24 Jul 2018 16:47:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 07:47:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,398,1526367600"; d="scan'208";a="69849108" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga002.fm.intel.com with ESMTP; 24 Jul 2018 07:46:59 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.124]) by IRSMSX104.ger.corp.intel.com ([169.254.5.225]) with mapi id 14.03.0319.002; Tue, 24 Jul 2018 15:46:58 +0100 From: "Pattan, Reshma" To: "dev@dpdk.org" CC: "Iremonger, Bernard" , "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: AQHUI1kj56wT3g5090KrZabW17apgqSecv/A Date: Tue, 24 Jul 2018 14:46:58 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A37617A@IRSMSX109.ger.corp.intel.com> References: <20180723104425.10090-1-jasvinder.singh@intel.com> <1532441847-7492-1-git-send-email-reshma.pattan@intel.com> In-Reply-To: <1532441847-7492-1-git-send-email-reshma.pattan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.181] 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 14:47:03 -0000 + 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 >=20 > Testpmd should be existed gracefully when ctrl+d is typed. > This behaviour is not handled properly, fix this by calling > pmd_test_exit() instead of rte_panic. >=20 > Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode") >=20 > 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(-) >=20 > 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) >=20 > 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