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 ABD0AA04C0; Tue, 29 Sep 2020 01:23:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 389751D569; Tue, 29 Sep 2020 01:16:43 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 4B3BA1DA11 for ; Tue, 29 Sep 2020 01:16:00 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id A77F25C00E5; Mon, 28 Sep 2020 19:15:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Mon, 28 Sep 2020 19:15:58 -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; s=fm2; bh=bTnjksrkZ4ca5 ljinf3/HAihp7/52r8LfEcASsDOi8Q=; b=ZSsV0F/S6w+wQ0q8ELLjHZRAqvgqI +lS1jvo7Dt1FTWmGxi1xdlugR4Bv4Avs6jBYWYBgOjluM3tMDHWDyPX+16psr67C W2NFvwSqcBFx3AiphPgljCMu3QHTc8mvrRsUMH68A4AyZWF8NLE8b2oOMeGMuHPF EEoJl/dtGiKWKRFuCG2s5jEOIIu8zQXwyI4QBA/i3uLO66YypdxpPhQfHQknFD1U GrtGILavdNRmwfOsNvGSxqjax4FeWC2GRwGsViUWrbcE+8Zp7niYNTWy0LjXV5nw +s2lYPtva5KLw7JEwZXSlMkxiRWWbk7UCF5KCsEBlhXhV9WUxYtVFwqZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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= fm3; bh=bTnjksrkZ4ca5ljinf3/HAihp7/52r8LfEcASsDOi8Q=; b=AMWJDC8G omdVziy0D0fy/yHb+CuC3yjCzqorDrnfCUWoQ7TKVYnblF+ErYT0b6JWZ/jRRL47 OcruU7Fuz8O2GNjyMX6sOg9Mhe6vH6Ow+W8h0VAFw8KRnqloR+TdMUnSqRMQ0Phq mpVvgM0MWAKDP8sHoncFjbMq6PaEEOrnMOTxPcBfgq/naHsEOEId5SMP/3l6kOH/ wMvjiTgRlyTxLOJoPJTfNu87qAS3A7Tp76bD1qEgcBg5rT8qps7GYwBzYdoRtXm4 FXx4bmK98aM9Y3NuzUBXqPWG5KXFr91xMTErS5cehlTJ8NV3UZtch2QwvTeTjkPC 7Y5jl15lytUOKg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdejgddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehm ohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepvdehgfeivdejgedtveehfe fhteelfefgieevgfffveefjeegtdfguedthedtgeevnecukfhppeejjedrudefgedrvddt fedrudekgeenucevlhhushhtvghrufhiiigvpedvkeenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 04BE4306467E; Mon, 28 Sep 2020 19:15:57 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: ferruh.yigit@intel.com, arybchenko@solarflare.com Date: Tue, 29 Sep 2020 01:14:35 +0200 Message-Id: <20200928231437.414489-28-thomas@monjalon.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200928231437.414489-1-thomas@monjalon.net> References: <20200913220711.3768597-1-thomas@monjalon.net> <20200928231437.414489-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 27/29] 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" When closing a port, it is supposed to be already stopped, and marked as such with "dev_started" state zeroed. 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()". Signed-off-by: Thomas Monjalon --- lib/librte_ethdev/rte_ethdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index d7668114ca..0b8e8e3e8d 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1716,7 +1716,6 @@ rte_eth_dev_close(uint16_t port_id) dev = &rte_eth_devices[port_id]; RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_close); - dev->data->dev_started = 0; (*dev->dev_ops->dev_close)(dev); rte_ethdev_trace_close(port_id); -- 2.28.0