From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 699903977 for ; Fri, 29 Dec 2017 14:37:27 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0B7BF2119D; Fri, 29 Dec 2017 08:37:27 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 29 Dec 2017 08:37:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=jRR1SeiQ+SZ6t0 sAHROmXvcfJbPT2+ekVOfzdqfFsV8=; b=Fn4H9QVUMYpanAGEw6t5+iFRdgGc7I qI8KN6PEkE+aBQRHmKHpluZ/IsspCeOL6FIjlOh61zEH2uibuwNHc1MpkQqXrcYU GWErldJwXHwjUtlJVpEIGswNR6gGFEdExjpF2Zf0u4nppt+5a+sQkT7Y/bZXQUz3 IV6K3trAW32Eo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=jRR1SeiQ+SZ6t0sAHROmXvcfJbPT2+ekVOfzdqfFsV8=; b=CR5Opasw ZqWYSG5cqTjAQRIwkZ1nU8G6xiObZ1UTG566w8DQldP2z8wK8BE8c4kLQ9v0rFwc TqAeAuRysfzt3j/D+C5DDpDPiUJq355UndtAoGn7NBRq2CkIrULzJYLKiQRBNUYK ChpY6QDqHtA+76RMuN1f/iEDwxEw5dlPJmhMtyIWp7yDq62A087v55kfnz6v1Wc4 tCBah7v20AlhwhnlLcvTvz+004ODxdxHXgUnPqNAnFlL9oVYu8lsVLb2Ii86hCsp ZEyBfR/ziJCFPYJbZQrPfS+HH6u1OSZoLQlGmisARbTo3JVBT8WJSzt3nG7kAqXY 2GwIhmwNhl71TA== X-ME-Sender: Received: from xps.monjalon.net (240.16.136.77.rev.sfr.net [77.136.16.240]) by mail.messagingengine.com (Postfix) with ESMTPA id BF1DA7E168; Fri, 29 Dec 2017 08:37:25 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Matan Azrad Date: Fri, 29 Dec 2017 14:36:56 +0100 Message-Id: <20171229133658.31258-4-thomas@monjalon.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171229133658.31258-1-thomas@monjalon.net> References: <20171128221302.15400-1-thomas@monjalon.net> <20171229133658.31258-1-thomas@monjalon.net> Subject: [dpdk-dev] [PATCH v3 3/5] ethdev: free detached port by the dedicated function 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, 29 Dec 2017 13:37:27 -0000 From: Matan Azrad In the port detach function, use the function to free an ethdev port instead of changing its state directly. Signed-off-by: Matan Azrad Acked-by: Thomas Monjalon --- v2: no change v3: no change --- lib/librte_ether/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 5323d445d..f40627fa3 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -436,7 +436,7 @@ rte_eth_dev_detach(uint16_t port_id, char *name) if (ret < 0) goto err; - rte_eth_devices[port_id].state = RTE_ETH_DEV_UNUSED; + rte_eth_dev_release_port(&rte_eth_devices[port_id]); return 0; err: -- 2.15.1