static inline void
rte_eth_dev_pci_release(struct rte_eth_dev *eth_dev)
{
- if (rte_eal_process_type() == RTE_PROC_PRIMARY)
- rte_free(eth_dev->data->dev_private);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+ eth_dev->device = NULL;
+ eth_dev->intr_handle = NULL;
+ rte_eth_dev_release_port_secondary(eth_dev);
+ return;
+ }
+ /* primary process */
+ rte_free(eth_dev->data->dev_private);
eth_dev->data->dev_private = NULL;
/*