]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_ether/rte_ethdev.c
ethdev: free detached port by the dedicated function
[dpdk.git] / lib / librte_ether / rte_ethdev.c
index 533bb5e11d41f9d23b28269990ac666b4999d76c..780b1d6176e5181566d74eeae7777d079722449d 100644 (file)
@@ -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: