From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id BFBB65A58 for ; Wed, 8 Jul 2015 11:04:44 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 08 Jul 2015 02:04:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,430,1432623600"; d="scan'208";a="724929336" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.63]) by orsmga001.jf.intel.com with SMTP; 08 Jul 2015 02:04:41 -0700 Received: by (sSMTP sendmail emulation); Wed, 08 Jul 2015 10:04:41 +0025 Date: Wed, 8 Jul 2015 10:04:41 +0100 From: Bruce Richardson To: "Qiu, Michael" Message-ID: <20150708090441.GA152@bricha3-MOBL3> References: <1435132585-10192-1-git-send-email-michael.qiu@intel.com> <533710CFB86FA344BFBF2D6802E60286046B2833@SHSMSX101.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <533710CFB86FA344BFBF2D6802E60286046B2833@SHSMSX101.ccr.corp.intel.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" 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 09:04:45 -0000 On Wed, Jul 08, 2015 at 07:16:21AM +0000, Qiu, Michael wrote: > Any comments? This is a bug fix, not a feature. > > Thanks, > Michael > > On 6/24/2015 3:56 PM, Qiu, Michael wrote: > > When close one port twice, testpmd will give out wrong messagse. > > > > testpmd> port stop 0 > > Stopping ports... > > Checking link statuses... > > Port 0 Link Up - speed 0 Mbps - full-duplex > > Port 1 Link Up - speed 0 Mbps - full-duplex > > Done > > testpmd> port close 0 > > Closing ports... > > Done > > testpmd> port close 0 > > Closing ports... > > Port 0 is now not stopped > > Done > > testpmd> > > > > > > Signed-off-by: Michael Qiu > > --- > > app/test-pmd/testpmd.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > > index 3057791..907cda3 100644 > > --- a/app/test-pmd/testpmd.c > > +++ b/app/test-pmd/testpmd.c > > @@ -1534,6 +1534,12 @@ close_port(portid_t pid) > > > > port = &ports[pi]; > > if (rte_atomic16_cmpset(&(port->port_status), > > + RTE_PORT_CLOSED, RTE_PORT_CLOSED) == 1) { > > + printf("Port %d is already closed\n", pi); > > + continue; > > + } > > + > > + if (rte_atomic16_cmpset(&(port->port_status), > > RTE_PORT_STOPPED, RTE_PORT_HANDLING) == 0) { > > printf("Port %d is now not stopped\n", pi); > > continue; I know it's not part of your change, but "Now not stopped" doesn't really seem right to me. What is the message actually trying to report? /Bruce >