From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 29E33282; Fri, 3 Feb 2017 09:21:38 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 03 Feb 2017 00:21:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,328,1477983600"; d="scan'208";a="1121566145" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 03 Feb 2017 00:21:37 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 3 Feb 2017 00:21:37 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 3 Feb 2017 00:21:37 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Fri, 3 Feb 2017 16:21:34 +0800 From: "Wu, Jingjing" To: "Iremonger, Bernard" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH v6 2/2] app/testpmd: fix port stop Thread-Index: AQHSeIsnXuXTOIb0xESM5JLMFxPghqFW+yaQ Date: Fri, 3 Feb 2017 08:21:33 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810CD3C32@SHSMSX103.ccr.corp.intel.com> References: <1485354963-17326-1-git-send-email-bernard.iremonger@intel.com> <1485514200-25230-3-git-send-email-bernard.iremonger@intel.com> In-Reply-To: <1485514200-25230-3-git-send-email-bernard.iremonger@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-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 08:21:39 -0000 > -----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 >=20 > 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. >=20 > Make sure rte_eth_dev_stop is always called in stop_port function. >=20 > Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") >=20 > CC: stable@dpdk.org > Signed-off-by: Bernard Iremonger > --- > app/test-pmd/testpmd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > 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; > } >=20 > + 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; >=20 > - rte_eth_dev_stop(pi); > - I don't think this fix is correct to move rte_eth_dev_stop above. We need to make sure rte_eth_dev_start is called in start_port. For vmdq co= nfiguration, You just need to change the configuration when port is stopped.