From: Matan Azrad Date: Thu, 4 Jan 2018 16:01:10 +0000 (+0100) Subject: ethdev: free detached port by the dedicated function X-Git-Tag: spdx-start~358 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a8332826c658685cab0c4803c05ceae61f73a43d;p=dpdk.git ethdev: free detached port by the dedicated function 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 --- diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 533bb5e11d..780b1d6176 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -408,7 +408,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: