]> git.droids-corp.org - dpdk.git/blobdiff - lib/ethdev/ethdev_pci.h
pipeline: support action annotations
[dpdk.git] / lib / ethdev / ethdev_pci.h
index 12015b6b8724ad1fd5ea7d804226e74b80c729b8..59c5d7b40fc53221efc53f2a57941dfda1d71f5a 100644 (file)
@@ -151,6 +151,16 @@ rte_eth_dev_pci_generic_remove(struct rte_pci_device *pci_dev,
        if (!eth_dev)
                return 0;
 
+       /*
+        * In secondary process, a released eth device can be found by its name
+        * in shared memory.
+        * If the state of the eth device is RTE_ETH_DEV_UNUSED, it means the
+        * eth device has been released.
+        */
+       if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
+           eth_dev->state == RTE_ETH_DEV_UNUSED)
+               return 0;
+
        if (dev_uninit) {
                ret = dev_uninit(eth_dev);
                if (ret)