From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 108B25A5E for ; Wed, 8 Jul 2015 09:18:57 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 08 Jul 2015 00:18:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,430,1432623600"; d="scan'208";a="758171121" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by fmsmga002.fm.intel.com with ESMTP; 08 Jul 2015 00:18:55 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 8 Jul 2015 15:16:24 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.246]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.168]) with mapi id 14.03.0224.002; Wed, 8 Jul 2015 15:16:22 +0800 From: "Qiu, Michael" To: "dev@dpdk.org" Thread-Topic: [PATCH] testpmd: Fix wrong message in testpmd Thread-Index: AQHQrlNRU65GkoaZSE2tKeJ/KHBJsw== Date: Wed, 8 Jul 2015 07:16:21 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286046B2833@SHSMSX101.ccr.corp.intel.com> References: <1435132585-10192-1-git-send-email-michael.qiu@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] testpmd: Fix wrong message in testpmd X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 07:18:58 -0000 Any comments? This is a bug fix, not a feature.=0A= =0A= Thanks,=0A= Michael=0A= =0A= On 6/24/2015 3:56 PM, Qiu, Michael wrote:=0A= > When close one port twice, testpmd will give out wrong messagse.=0A= >=0A= > testpmd> port stop 0=0A= > Stopping ports...=0A= > Checking link statuses...=0A= > Port 0 Link Up - speed 0 Mbps - full-duplex=0A= > Port 1 Link Up - speed 0 Mbps - full-duplex=0A= > Done=0A= > testpmd> port close 0=0A= > Closing ports...=0A= > Done=0A= > testpmd> port close 0=0A= > Closing ports...=0A= > Port 0 is now not stopped=0A= > Done=0A= > testpmd> =0A= >=0A= >=0A= > Signed-off-by: Michael Qiu =0A= > ---=0A= > app/test-pmd/testpmd.c | 6 ++++++=0A= > 1 file changed, 6 insertions(+)=0A= >=0A= > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c=0A= > index 3057791..907cda3 100644=0A= > --- a/app/test-pmd/testpmd.c=0A= > +++ b/app/test-pmd/testpmd.c=0A= > @@ -1534,6 +1534,12 @@ close_port(portid_t pid)=0A= > =0A= > port =3D &ports[pi];=0A= > if (rte_atomic16_cmpset(&(port->port_status),=0A= > + RTE_PORT_CLOSED, RTE_PORT_CLOSED) =3D=3D 1) {=0A= > + printf("Port %d is already closed\n", pi);=0A= > + continue;=0A= > + }=0A= > +=0A= > + if (rte_atomic16_cmpset(&(port->port_status),=0A= > RTE_PORT_STOPPED, RTE_PORT_HANDLING) =3D=3D 0) {=0A= > printf("Port %d is now not stopped\n", pi);=0A= > continue;=0A= =0A=