[dpdk-dev] [PATCH v3 3/5] ethdev: free detached port by the dedicated function
Thomas Monjalon
thomas at monjalon.net
Fri Dec 29 14:36:56 CET 2017
From: Matan Azrad <matan at mellanox.com>
In the port detach function, use the function to free an ethdev port
instead of changing its state directly.
Signed-off-by: Matan Azrad <matan at mellanox.com>
Acked-by: Thomas Monjalon <thomas at monjalon.net>
---
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
More information about the dev
mailing list