rte_free(internal);
dev->data->dev_private = NULL;
+
+ rte_free(vring_states[dev->data->port_id]);
+ vring_states[dev->data->port_id] = NULL;
}
static int
internal->max_queues = queues;
internal->vid = -1;
data->dev_link = pmd_link;
- data->dev_flags = RTE_ETH_DEV_INTR_LSC;
+ data->dev_flags = RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE;
eth_dev->dev_ops = &ops;
/* find an ethdev entry */
eth_dev = rte_eth_dev_allocated(name);
if (eth_dev == NULL)
- return -ENODEV;
+ return 0;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return rte_eth_dev_release_port(eth_dev);
eth_dev_close(eth_dev);
- rte_free(vring_states[eth_dev->data->port_id]);
- vring_states[eth_dev->data->port_id] = NULL;
-
rte_eth_dev_release_port(eth_dev);
return 0;