From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A2529A04B7; Tue, 13 Oct 2020 14:49:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1C85B1DAE3; Tue, 13 Oct 2020 14:49:25 +0200 (CEST) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id C088B1DA76 for ; Tue, 13 Oct 2020 14:49:23 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 27C0B58034C; Tue, 13 Oct 2020 08:49:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 13 Oct 2020 08:49:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= jGpYYZoVn5dmAw0CncHVnvgiZNG++g/34m6aR9s91oI=; b=lQvA2MgvZXndMkDb rbM1zHrCqUKpnsyHNm1l49oRSwKp4pbUG/pMsTu6P2sSBCeYPlftnJA3wHiA1x5M x/T0jOz+2fW2+ypqtPOIeVPWkU/O77bSQE2V4UwalWs/HTE87dcL+7YLot4ZWNdX gf25EFTX5DRMVxE9lSqaetkIosBGoHSTuzLdlrNfhefsGfBjGYH7kO5gh+qRc8Ps 1htHHMJJtupDJfHZJyBlrRswIpsd5vrSd3fJjJKqouF1Grp9kN8MQeEOxEPJST/t K4DzJ8FmArd8/MUwAGs7ctYY6kSbFy0emXEV6iED3qPCUSv9avqL2YS6JXo/vLTk ZdsF+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=jGpYYZoVn5dmAw0CncHVnvgiZNG++g/34m6aR9s91 oI=; b=W+HJO563YiHNOeL6Qzj1VGjS9gECKGeH6UK9SxGjfCiRBPOkuaVshZ6TS P9wNIQ+S71W4GyXepUgnLt3NoWTI4u4ta38FlZQCcxWzuUkQXCYotlp/njUllwUJ jBBm5u2850RCAZo8SUYHcmivTVbxnksxONPVLrlpIgekU49vz/VKIVZflv/CKYrJ ZhCiJnNnclSh/K3MuZmHpQbG4+IJ/PKGS0wGPcEOsO71t4VyURUxhUilH+Ir5PSQ Gll6KdgM+01O5cA9ucLnXZ+lfcrpb9ehpNufEPZ74MY5de0frsLMZSu2RRaoOARP wPMrINfsZk5xNd0p7UgblLE/w2yUQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrheelgdehiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id C6DE6306467E; Tue, 13 Oct 2020 08:49:13 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org, Ferruh Yigit Cc: arybchenko@solarflare.com, Stephen Hemminger , Shepard Siegel , Ed Czeck , John Miller , Igor Russkikh , Pavel Belous , Hemant Agrawal , Sachin Saxena , Jeff Guo , Haiyue Wang , Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin , Igor Chauskin , Gagandeep Singh , Qi Zhang , Xiao Wang , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , "Wei Hu (Xavier)" , "Min Hu (Connor)" , Yisen Zhuang , Beilei Xing , Jingjing Wu , Qiming Yang , Shijith Thotton , Srisivasubramanian Srinivasan , Zyta Szpak , Liron Himi , Stephen Hemminger , "K. Y. Srinivasan" , Haiyang Zhang , Long Li , Martin Spinler , Akhil Goyal , Rasesh Mody , Shahed Shaikh , Bruce Richardson , Jerin Jacob , Maciej Czekaj , Maxime Coquelin , Chenbo Xia , Zhihong Wang , Yong Wang , Andrew Rybchenko Date: Tue, 13 Oct 2020 14:49:12 +0200 Message-ID: <1735594.Vx749x7qql@thomas> In-Reply-To: <307b1ce6-a06f-6feb-25a2-5f791156b75f@intel.com> References: <20200913220711.3768597-1-thomas@monjalon.net> <20201013100634.2482593-2-thomas@monjalon.net> <307b1ce6-a06f-6feb-25a2-5f791156b75f@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5 1/3] ethdev: remove forcing stopped state upon close 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 13/10/2020 14:36, Ferruh Yigit: > On 10/13/2020 11:06 AM, Thomas Monjalon wrote: > > When closing a port, it is supposed to be already stopped, > > and marked as such with "dev_started" state zeroed by the stop API. > > > > Resetting "dev_started" before calling the driver close operation > > was hiding the case of not properly stopped port being closed. > > The flag "dev_started" is not changed anymore in "rte_eth_dev_close()". > > > > In case the "dev_stop" function is called from "dev_close", > > bypassing "rte_eth_dev_stop()" API, > > the "dev_started" state must be explicitly reset in the PMD > > in order to keep the same behaviour. > > > > Signed-off-by: Thomas Monjalon > > Acked-by: Stephen Hemminger > > Reviewed-by: Andrew Rybchenko > > <...> > > > @@ -1497,6 +1497,7 @@ eth_igb_stop(struct rte_eth_dev *dev) > > } > > > > adapter->stopped = true; > > + dev->data->dev_started = 0; > > } > > 'igbvf_dev_stop()' may be missed. Will check > <...> > > > @@ -2917,6 +2917,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev) > > adapter->rss_reta_updated = 0; > > > > hw->adapter_stopped = true; > > + dev->data->dev_started = 0; > > } > > 'ixgbevf_dev_stop()' may be missed. Will check > Also many virtual PMDs doesn't call 'dev_stop()' from the 'dev_close()', for > many cases they may not needed to, since there is no device to stop. > But for the sake of the correct status, should 'dev_started' set to '0' in > 'dev_close()' dev_ops, or do you think can we ignore this? I think we can ignore for this patch, but maybe these PMDs could be updated separately to comply with the stop/close sequence.