common/sfc_efx/base: add NIC magic check on BAR lookup
[dpdk.git] / lib / librte_eventdev / rte_eventdev_pmd_pci.h
index 32a077e..443cd38 100644 (file)
@@ -20,6 +20,7 @@ extern "C" {
 
 #include <string.h>
 
+#include <rte_config.h>
 #include <rte_eal.h>
 #include <rte_lcore.h>
 #include <rte_pci.h>
@@ -111,9 +112,11 @@ rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev,
        if (eventdev == NULL)
                return -ENODEV;
 
-       ret = rte_event_dev_close(eventdev->data->dev_id);
-       if (ret < 0)
-               return ret;
+       if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+               ret = rte_event_dev_close(eventdev->data->dev_id);
+               if (ret < 0)
+                       return ret;
+       }
 
        /* Invoke PMD device un-init function */
        if (devuninit)