From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH v4 3/5] ethdev: free detached port by the dedicated function Date: Thu, 4 Jan 2018 17:01:10 +0100 Message-ID: <20180104160112.28651-4-thomas@monjalon.net> References: <20171128221302.15400-1-thomas@monjalon.net> <20180104160112.28651-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 5A68C8E01 for ; Thu, 4 Jan 2018 17:01:40 +0100 (CET) In-Reply-To: <20180104160112.28651-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 v3: no change v4: 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 7b440fc6b..8700f6f43 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