aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_ether/rte_ethdev_pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_ether/rte_ethdev_pci.h')
-rw-r--r--lib/librte_ether/rte_ethdev_pci.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/librte_ether/rte_ethdev_pci.h b/lib/librte_ether/rte_ethdev_pci.h
index d3bc03cf..60730073 100644
--- a/lib/librte_ether/rte_ethdev_pci.h
+++ b/lib/librte_ether/rte_ethdev_pci.h
@@ -134,6 +134,12 @@ rte_eth_dev_pci_release(struct rte_eth_dev *eth_dev)
eth_dev->data->dev_private = NULL;
+ /*
+ * Secondary process will check the name to attach.
+ * Clear this field to avoid attaching a released ports.
+ */
+ eth_dev->data->name[0] = '\0';
+
eth_dev->device = NULL;
eth_dev->intr_handle = NULL;
}