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 <matan@mellanox.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
This commit is contained in:
parent
9ec0b3869d
commit
a8332826c6
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user