From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 43E5F568F for ; Thu, 5 Mar 2015 02:57:45 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 04 Mar 2015 17:57:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,344,1422950400"; d="scan'208";a="675343876" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by fmsmga001.fm.intel.com with ESMTP; 04 Mar 2015 17:57:43 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 5 Mar 2015 09:57:41 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.192]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.46]) with mapi id 14.03.0195.001; Thu, 5 Mar 2015 09:57:40 +0800 From: "Qiu, Michael" To: "dev@dpdk.org" Thread-Topic: [PATCH] app/test-pmd: Fix log issue without nic binded Thread-Index: AQHQVMNQ1gJiJ2skxUmzsUYN0V/bhA== Date: Thu, 5 Mar 2015 01:57:39 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286CEEA5D@SHSMSX101.ccr.corp.intel.com> References: <1425285097-14781-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] app/test-pmd: Fix log issue without nic binded 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: Thu, 05 Mar 2015 01:57:45 -0000 Hi, all=0A= =0A= What about this patch?=0A= =0A= Thanks,=0A= Michael=0A= =0A= =0A= On 3/2/2015 4:31 PM, Qiu, Michael wrote:=0A= > As hotplug has been enabled, start the testpmd with no nic binded=0A= > will show one error log "Please stop the ports first":=0A= >=0A= > Interactive-mode selected=0A= > Please stop the ports first=0A= > Done=0A= > testpmd>=0A= >=0A= > This issue is cause by the logic of check link status.=0A= >=0A= > Signed-off-by: Michael Qiu =0A= > ---=0A= > app/test-pmd/testpmd.c | 7 ++++---=0A= > 1 file changed, 4 insertions(+), 3 deletions(-)=0A= >=0A= > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c=0A= > index 61291be..e556b4c 100644=0A= > --- a/app/test-pmd/testpmd.c=0A= > +++ b/app/test-pmd/testpmd.c=0A= > @@ -1315,7 +1315,7 @@ port_is_closed(portid_t port_id)=0A= > int=0A= > start_port(portid_t pid)=0A= > {=0A= > - int diag, need_check_link_status =3D 0;=0A= > + int diag, need_check_link_status =3D -1;=0A= > portid_t pi;=0A= > queueid_t qi;=0A= > struct rte_port *port;=0A= > @@ -1337,6 +1337,7 @@ start_port(portid_t pid)=0A= > if (pid !=3D pi && pid !=3D (portid_t)RTE_PORT_ALL)=0A= > continue;=0A= > =0A= > + need_check_link_status =3D 0;=0A= > port =3D &ports[pi];=0A= > if (rte_atomic16_cmpset(&(port->port_status), RTE_PORT_STOPPED,=0A= > RTE_PORT_HANDLING) =3D=3D 0) {=0A= > @@ -1457,9 +1458,9 @@ start_port(portid_t pid)=0A= > need_check_link_status =3D 1;=0A= > }=0A= > =0A= > - if (need_check_link_status && !no_link_check)=0A= > + if (need_check_link_status =3D=3D 1 && !no_link_check)=0A= > check_all_ports_link_status(RTE_PORT_ALL);=0A= > - else=0A= > + else if (need_check_link_status =3D=3D 0)=0A= > printf("Please stop the ports first\n");=0A= > =0A= > printf("Done\n");=0A= =0A=