From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id BD08D2C49 for ; Fri, 10 Mar 2017 14:17:55 +0100 (CET) Received: by mail-wm0-f42.google.com with SMTP id t189so10402591wmt.1 for ; Fri, 10 Mar 2017 05:17:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=lXsufyxUizqVnPyIIuRHZZQcJs6PSOHkJR5Mk+1tC9I=; b=mLqI7hzioEZeqPq8Yc4CIUoB29H725FwqDqatZIPJ+vM6Qm7I51s7k/2atdSCh/GxQ UI9YMZ+nOptYg/FwxoM9A9vxada5WOnRMNRwtzdknwsgl7B0zd2ga0AkGjYr16vLMzsc Zgg9S+MLnHOjgcbIPnlipGXJRfmkOqShEyfoEBY3wCFiy8q2GYwOrYE16SCU6vnpAjie 9a633xOf+EtdnkhpPPIJ1mDC3HokRl2jBwP/bIjkxnRU7Tm8a8GKssA2Y57xHmaptA61 e8iVq8Miqk8TI+xioeXG2QGzrQIgsI/38jluQhEiUagne6P4Eo9g0RFLBgPe4V9u2d9X 64Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=lXsufyxUizqVnPyIIuRHZZQcJs6PSOHkJR5Mk+1tC9I=; b=B/tUrE3WAlTtpage7lU4ps2nV4IM6V/R4ec8acMZoR5ReAlcpls3MHreWz8k6scM2Z 2BqcWNQ4XXDPhldi8wPl9cqj9QxUMdGGtHK8IPokYJ/zl3DnpAAy4NZyMHTnQ+kpuwPW TsZxTP+k1SsDU6I5SWRuP+MRGmJ41f6WA3h50NAHae6TFAWp333enTnaCbImDARK/cOa HVUucLZKQYACIM2a4Xhf8Uv3axxWbDkTjxAcaW88LLZoHCKP9Gzk0kPyKF0cztFcy651 wkml4cKP5B1OXm/rxEhx567Cf0u6Cl4+MIyMSiUpF9BC50RQtYxqrmQcNDkkTjlwKSHc JveQ== X-Gm-Message-State: AFeK/H3Zz7KmL7GkGJNNIXt64Yaqlx3ZpUjYiz746/3ivBKdIb6/IqS/IGHo/osRz8LCX8mL X-Received: by 10.28.150.136 with SMTP id y130mr2336687wmd.103.1489151875560; Fri, 10 Mar 2017 05:17:55 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id p185sm3283246wme.20.2017.03.10.05.17.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Mar 2017 05:17:54 -0800 (PST) From: Thomas Monjalon To: "Wu, Jingjing" , "Iremonger, Bernard" Cc: dev@dpdk.org Date: Fri, 10 Mar 2017 14:17:54 +0100 Message-ID: <6179789.zosxSocSkF@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <9BB6961774997848B5B42BEC655768F810CD9A71@SHSMSX103.ccr.corp.intel.com> References: <1485354963-17326-1-git-send-email-bernard.iremonger@intel.com> <8CEF83825BEC744B83065625E567D7C224D25BBD@IRSMSX108.ger.corp.intel.com> <9BB6961774997848B5B42BEC655768F810CD9A71@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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, 10 Mar 2017 13:17:55 -0000 2017-02-12 04:34, Wu, Jingjing: > > > > --- 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 = &ports[pi]; > > > > if (rte_atomic16_cmpset(&(port->port_status), > > > > RTE_PORT_STARTED, > > > > RTE_PORT_HANDLING) == 0) > > > > continue; > > > > > > > > - 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 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 > > port_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. > > > This is testpmd's design. If you think it is an issue, maybe you need to prepare patch to optimize it. But for VMDQ configuration, I'd like to make it independent but not mixed. > > > The VMDq configuration is done whet the port is stopped, however to the > > complete the VMDq configuration the port must be started. > > > > To change minor, we can stop port, then configure VMDQ and then start port. > > You make port started in VMDQ config, the Symmetry of stop/start command is broken and it is not easy to maintain. Should we close this patch in patchwork?