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 DCD76A0613 for ; Mon, 23 Sep 2019 12:19:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9C6E41BE9D; Mon, 23 Sep 2019 12:19:45 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B85E41BE92; Mon, 23 Sep 2019 12:19:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2019 03:19:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,539,1559545200"; d="scan'208";a="179082707" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga007.jf.intel.com with ESMTP; 23 Sep 2019 03:19:39 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.26]) by irsmsx105.ger.corp.intel.com ([169.254.7.164]) with mapi id 14.03.0439.000; Mon, 23 Sep 2019 11:19:38 +0100 From: "Iremonger, Bernard" To: "Wang, ShougangX" , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Yang, Qiming" , "Yigit, Ferruh" , "Wang, ShougangX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] app/testpmd: fix Segment fault when start fwd Thread-Index: AQHVb2fCDkNtAfTu9k6sb8D8pf3ISKc5ELmQ Date: Mon, 23 Sep 2019 10:19:37 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260DFA9AA@IRSMSX108.ger.corp.intel.com> References: <20190906012838.64088-1-shougangx.wang@intel.com> <20190920031333.16859-1-shougangx.wang@intel.com> In-Reply-To: <20190920031333.16859-1-shougangx.wang@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2M2ZjkwNGUtYzQyMy00YWQ2LTkwNjAtNjk1ZTkzNzVhM2IwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiV0thanJ0b0FvS3h4azZQZ3htUXlDU2xRZnNjY0xseE13YUIrRDVvOFMyNHNpck1Gc211M1lqN0pHUkQ0bVBDVSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [163.33.239.182] 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 Shougangx > -----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 >=20 > This patch fixed the reset function to avoid crash when user don't call p= ort > stop, port reset and port start functions as sequence. >=20 > Fixes: 97f1e19679 ("app/testpmd: add port reset command") > Cc: stable@dpdk.org >=20 > 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(+) >=20 > 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; >=20 > + stop_port(pid); > + > printf("Resetting ports...\n"); >=20 > RTE_ETH_FOREACH_DEV(pi) { The app/test-pmd/cmdline.c file should be updated at line 760 to add help = 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:: >=20 > testpmd> port close (port_id|all) >=20 > +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 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > -- > 2.17.1 Regards, Bernard.