From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <dev-bounces@dpdk.org> Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA3CDA0542; Thu, 26 May 2022 12:24:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BA0740E78; Thu, 26 May 2022 12:24:50 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 8B3F040DF7; Thu, 26 May 2022 12:24:48 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id C8A255C0099; Thu, 26 May 2022 06:24:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 26 May 2022 06:24:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1653560687; x= 1653647087; bh=/MSOEDPB6UR+JiCEaU2Okg2KhyPPOAbP51OS8BQ8mhg=; b=W BgVUDMIRsu6VSPhDVgYgwm3pot0tNHdZ7BcQNjnVwTU7k/qEAR4+ufmAzJluysow UX68BQBC1xyQ23UiNrOUtZIOKLnA4lOGYAW4atbXRRLvaUIYC9dwDO+YwDzwOvT5 OLJrNel+RqCmqRkxuyFVBMsEPWgvEmf4GajB/3GCHPR1jz9f9GDv+Pcs8YKfnT6e y9Jlmhr9WBEc+oigcP5q3PuRjZqSigiFzgcVwZMCjq4tPwaakcs2AR0nrAJNk6L2 TMCOkpqYBC4SbshCzwn90Q7NQIsFM/QCg1xtR9g2z+y5VUE1Gso1S/LGPYsRMqVP ggyxTvVUo8nHTq3jOSfcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1653560687; x= 1653647087; bh=/MSOEDPB6UR+JiCEaU2Okg2KhyPPOAbP51OS8BQ8mhg=; b=h w1Lu/Ng7LGgTCainuJaSN6QxBR39Tecj/cL+fNAwV3LMQCJ3zEcF5Cs7R4Sn2iya p4VoJSRNZ6o4jlVlcLGbI9oGqnvUYl4FOyXIKVSMNLYw+0Gbfg5FLB/yhDGfPJd+ dNaUlR4dEjTRyFEJeU9xQnb5UuSrVFbX6332iXGl+btMTvEKuQab9p/ibbxFNJ6q FzCtAPSq+LrrOFm9c1y5s2XcXMUdG+viB90XqPmmFp/Khedc/03+aNVp9YfMYkgx yP9Esy62nFmaL8ZPmz/6NwhrjB+YSy9SuVDdsuKeSy8n5SsqFs7IVVOT1T4EOd5F +N/bRhoXLgh28uJmsoApg== X-ME-Sender: <xms:b1WPYgA9FIwbev61dKiSxxgskkHwQVcaGxJ_Id8EWpMtc9VhyXYQzg> <xme:b1WPYigVYlcBqtZMASQMePNS6rAWSTYIf7ewBeT5WKgfTMat7bgYhKzc7Y1QYRIO9 hhU4QzemAXfIr4Y4Q> X-ME-Received: <xmr:b1WPYjlKBXzhT2YmspUbOV0SokSxHsGQ6RzDuQaaFFIG1woV737PmUxPV-kyriVrG-EITeSxl3yoq_yMOfwtYGA> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrjeejgddviecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: <xmx:b1WPYmw8X66VyScSVYfWnnsSlYmM6P74oJ5-4M-2oNMWa7lcuqcbGg> <xmx:b1WPYlSGqWZXwdRi_ZbAcMNHIHy2yhkr881twWMyOyPLKMvMF6z0_Q> <xmx:b1WPYhZGNDPVotqfMmuu2IhcdQv5WJgQeve-ijTTssdlW5KPu08Dtg> <xmx:b1WPYjP0y5VQEajVt8mPKrl_FhXi4lPX1GX3YHxP9QorWsdQFu_njA> Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 May 2022 06:24:45 -0400 (EDT) From: Thomas Monjalon <thomas@monjalon.net> To: "Min Hu (Connor)" <humin29@huawei.com>, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>, Ferruh Yigit <ferruh.yigit@xilinx.com> Cc: stable@dpdk.org, Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>, dev@dpdk.org Subject: Re: [PATCH v3 5/5] ethdev: fix dev state when stop Date: Thu, 26 May 2022 12:21:03 +0200 Message-ID: <2404827.KokGdZ0ToA@thomas> In-Reply-To: <ec8b7e51-6f7d-276f-8197-377222ec0dc1@xilinx.com> References: <20220324030036.4761-1-humin29@huawei.com> <20220503100217.46203-6-humin29@huawei.com> <ec8b7e51-6f7d-276f-8197-377222ec0dc1@xilinx.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org 25/05/2022 19:44, Ferruh Yigit: > On 5/3/2022 11:02 AM, Min Hu (Connor) wrote: > > Currently, 'dev_started' is always set to be 0 when dev stop, whether > > it succeeded or failed. This is unreasonable and this patch fixed it. > > > > Fixes: 62024eb82756 ("ethdev: change stop operation callback to return int") > > Cc: stable@dpdk.org > > > > Signed-off-by: Min Hu (Connor) <humin29@huawei.com> > > --- > > lib/ethdev/rte_ethdev.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c > > index 29a3d80466..e0011372aa 100644 > > --- a/lib/ethdev/rte_ethdev.c > > +++ b/lib/ethdev/rte_ethdev.c > > @@ -1533,8 +1533,9 @@ rte_eth_dev_stop(uint16_t port_id) > > /* point fast-path functions to dummy ones */ > > eth_dev_fp_ops_reset(rte_eth_fp_ops + port_id); > > > > - dev->data->dev_started = 0; > > ret = (*dev->dev_ops->dev_stop)(dev); > > + if (ret == 0) > > + dev->data->dev_started = 0; > > rte_ethdev_trace_stop(port_id, ret); > > > > return ret; > > Change looks good to me, I checked for possible unexpected side effect > but I did not see any. > > @Andrew, @Thomas, if you also don't see/remember any issue related > change, I will push it soon. Acked-by: Thomas Monjalon <thomas@monjalon.net>