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 C2B28282; Fri, 3 Feb 2017 11:37:35 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 03 Feb 2017 02:37:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,328,1477983600"; d="scan'208";a="39222823" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by orsmga002.jf.intel.com with ESMTP; 03 Feb 2017 02:37:33 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.173]) by IRSMSX153.ger.corp.intel.com ([169.254.9.160]) with mapi id 14.03.0248.002; Fri, 3 Feb 2017 10:37:32 +0000 From: "Iremonger, Bernard" To: "Wu, Jingjing" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH v6 2/2] app/testpmd: fix port stop Thread-Index: AQHSeIsmgv6XHQxl4EKTnrjMKTwJr6FW+/eAgAAXXaA= Date: Fri, 3 Feb 2017 10:37:32 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C224D25BBD@IRSMSX108.ger.corp.intel.com> References: <1485354963-17326-1-git-send-email-bernard.iremonger@intel.com> <1485514200-25230-3-git-send-email-bernard.iremonger@intel.com> <9BB6961774997848B5B42BEC655768F810CD3C32@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F810CD3C32@SHSMSX103.ccr.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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjcyZmFmZmQtY2I5NC00NGU5LTk0MGYtNzNkYjhmMmIyZDI0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNi4yLjExLjAiLCJUcnVzdGVkTGFiZWxIYXNoIjoieFdaSFVvQ3hNcjVXTThCbElsblo3djQ2MGsxNVZzdVlIRm9Yd3lSRjVSOD0ifQ== x-ctpclassification: CTP_PUBLIC 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-dev] [PATCH v6 2/2] app/testpmd: fix port stop 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: Fri, 03 Feb 2017 10:37:36 -0000 Hi Jingjing > -----Original Message----- > From: Wu, Jingjing > Sent: Friday, February 3, 2017 8:22 AM > To: Iremonger, Bernard ; dev@dpdk.org > Cc: stable@dpdk.org > Subject: RE: [PATCH v6 2/2] app/testpmd: fix port stop >=20 >=20 >=20 > > -----Original Message----- > > From: Iremonger, Bernard > > Sent: Friday, January 27, 2017 6:50 PM > > To: dev@dpdk.org; Wu, Jingjing > > Cc: Iremonger, Bernard ; > stable@dpdk.org > > Subject: [PATCH v6 2/2] app/testpmd: fix port stop > > > > The rte_eth_dev_stop function is not called if the port_status is not > > RTE_PORT_STARTED. This can happen if the rte_eth_dev_start function is > > called directly, ie not through the start_port function. > > > > Make sure rte_eth_dev_stop is always called in stop_port function. > > > > Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") > > > > CC: stable@dpdk.org > > Signed-off-by: Bernard Iremonger > > --- > > app/test-pmd/testpmd.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > > 3d25436..0d7a4d4 100644 > > --- a/app/test-pmd/testpmd.c > > +++ b/app/test-pmd/testpmd.c > > @@ -1490,13 +1490,13 @@ stop_port(portid_t pid) > > continue; > > } > > > > + rte_eth_dev_stop(pi); > > + > > port =3D &ports[pi]; > > if (rte_atomic16_cmpset(&(port->port_status), > > RTE_PORT_STARTED, > > RTE_PORT_HANDLING) =3D=3D 0) > > continue; > > > > - rte_eth_dev_stop(pi); > > - >=20 > I don't think this fix is correct to move rte_eth_dev_stop above. >=20 > We need to make sure rte_eth_dev_start is called in start_port. For vmdq > configuration, You just need to change the configuration when port is > stopped. I think the stop_port() function should always stop the port even if the po= rt_status is not correct for any reason. At present stop_port() returns without stopping the port if the port_status= is not RTE_PORT_STARTED. The VMDq configuration is done whet the port is stopped, however to the com= plete the VMDq configuration the port must be started. Regards, Bernard.