From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH v2 2/3] ethdev: free detached port by the dedicated function Date: Fri, 29 Dec 2017 14:12:33 +0100 Message-ID: <20171229131234.26530-3-thomas@monjalon.net> References: <20171128221302.15400-1-thomas@monjalon.net> <20171229131234.26530-1-thomas@monjalon.net> Cc: ferruh.yigit@intel.com, Matan Azrad To: dev@dpdk.org 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) In-Reply-To: <20171229131234.26530-1-thomas@monjalon.net> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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