From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1FEBA0613 for ; Tue, 24 Sep 2019 03:43:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8102A4C9D; Tue, 24 Sep 2019 03:43:21 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 54D5837A2; Tue, 24 Sep 2019 03:43:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2019 18:43:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,542,1559545200"; d="scan'208";a="339922187" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 23 Sep 2019 18:43:16 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Sep 2019 18:43:16 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 23 Sep 2019 18:43:16 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 23 Sep 2019 18:43:15 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.92]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.23]) with mapi id 14.03.0439.000; Tue, 24 Sep 2019 09:43:14 +0800 From: "Wang, ShougangX" To: "Iremonger, Bernard" , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Yang, Qiming" , "Yigit, Ferruh" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] app/testpmd: fix Segment fault when start fwd Thread-Index: AQHVb2ezdZlSCVkcQU6VQFa1UKyL96c4i+KAgAGHFfA= Date: Tue, 24 Sep 2019 01:43:13 +0000 Message-ID: <00A8E5A1740DFA49A87AFFAC34B8EDEA3881E7@SHSMSX101.ccr.corp.intel.com> References: <20190906012838.64088-1-shougangx.wang@intel.com> <20190920031333.16859-1-shougangx.wang@intel.com> <8CEF83825BEC744B83065625E567D7C260DFA9AA@IRSMSX108.ger.corp.intel.com> In-Reply-To: <8CEF83825BEC744B83065625E567D7C260DFA9AA@IRSMSX108.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] app/testpmd: fix Segment fault when start fwd X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi Bernard > The app/test-pmd/cmdline.c file should be updated at line 760 to add hel= p text > for the "port reset (port_id|all)\n" command. Thank you very much, I will add in next patch. Thanks. Shougang > -----Original Message----- > From: Iremonger, Bernard > Sent: Monday, September 23, 2019 6:20 PM > To: Wang, ShougangX ; dev@dpdk.org > Cc: Lu, Wenzhuo ; Yang, Qiming > ; Yigit, Ferruh ; Wang, > ShougangX ; stable@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v2] app/testpmd: fix Segment fault when st= art > fwd >=20 > Hi Shougangx >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wang ShougangX > > Sent: Friday, September 20, 2019 4:14 AM > > To: dev@dpdk.org > > Cc: Lu, Wenzhuo ; Yang, Qiming > > ; Yigit, Ferruh ; Wang, > > ShougangX ; stable@dpdk.org > > Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix Segment fault when > > start fwd > > > > This patch fixed the reset function to avoid crash when user don't > > call port stop, port reset and port start functions as sequence. > > > > Fixes: 97f1e19679 ("app/testpmd: add port reset command") > > Cc: stable@dpdk.org > > > > Signed-off-by: Wang ShougangX > > --- > > app/test-pmd/testpmd.c | 2 ++ > > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 9 +++++++++ > > 2 files changed, 11 insertions(+) > > > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > > e8e2a39b6..9224aa1f7 100644 > > --- a/app/test-pmd/testpmd.c > > +++ b/app/test-pmd/testpmd.c > > @@ -2344,6 +2344,8 @@ reset_port(portid_t pid) > > if (port_id_is_invalid(pid, ENABLED_WARN)) > > return; > > > > + stop_port(pid); > > + > > printf("Resetting ports...\n"); > > > > RTE_ETH_FOREACH_DEV(pi) { >=20 > The app/test-pmd/cmdline.c file should be updated at line 760 to add hel= p text > for the "port reset (port_id|all)\n" command. >=20 > > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > index 313e0707e..2c459810c 100644 > > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > @@ -2041,6 +2041,15 @@ Close all ports or a specific port:: > > > > testpmd> port close (port_id|all) > > > > +port reset > > +~~~~~~~~~~ > > + > > +Reset all ports or a specific port:: > > + > > + testpmd> port reset (port_id|all) > > + > > +User should (re-)start the port after reset. > > + > > port config - queue ring size > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > -- > > 2.17.1 >=20 > Regards, >=20 > Bernard.