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 647AE237 for ; Fri, 29 Dec 2017 14:13:27 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id DFB902100E; Fri, 29 Dec 2017 08:13:26 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 29 Dec 2017 08:13:26 -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=4w2oU/G3XBchGJ 8BCoSHNhJgN6PkwihGyZbZylHS7Vc=; b=lGptBCMHDF8IckYhDBKH74FLGSL6is nxw7PnmOODib5UU1NX/1gbPZ/RwNScICqywTYiXklvIBbQWPzNfEih7dyGKE7N2C H5wW2elQbFS9SpdKqU4yjdRFDXKA4xAwkwzH5LM98D5W+tR+eOKQw6fEZEVlU+0V rPxcpqTgwDbX0= 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=4w2oU/G3XBchGJ8BCoSHNhJgN6PkwihGyZbZylHS7Vc=; b=IUwLfs/X wf5sxVYhR02FZ0UIjFAThVJFrMRnW3X2aqJmmJNa6IUH6FuYeJ5C8ovGNdBhvuj4 Pl7FTvfp6JYmlAgusZeTJmO0Wslstf2XXowgeUlBhhnmpRye7qOSAqzvlP8hUsT4 lv0yXHKPHYpB74ei3khhTG40oyz1ZKJ4J6MYNO0p53JizCNcyXI3fsAvAxf2fi+d +k6Z9oiTKMqippesqyMb5OgN1gUc7inIhX6hJCljjACYq6L624xFHRnafZLBZrj3 wDtQXLmviYsiMRRZQKuGPQTelI1urnPlaOGYg8zttF77hWWFAvDOp0xrj6FHx7GW 0E6v3YWOVAZt2A== 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 67D6424741; Fri, 29 Dec 2017 08:13:23 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Matan Azrad Date: Fri, 29 Dec 2017 14:12:33 +0100 Message-Id: <20171229131234.26530-3-thomas@monjalon.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171229131234.26530-1-thomas@monjalon.net> References: <20171128221302.15400-1-thomas@monjalon.net> <20171229131234.26530-1-thomas@monjalon.net> Subject: [dpdk-dev] [PATCH v2 2/3] 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:13: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, just grouped in a patchset --- 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