On 26/06/2018 08:08, Qi Zhang wrote:
[..]
static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
{
+ struct rte_eth_dev *ethdev;
+ ethdev = rte_eth_dev_allocated(pci_dev->device.name);
+
+ if (!ethdev)
+ return -ENODEV;
+
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return rte_eth_dev_release_port_private(ethdev);
+
return rte_eth_dev_pci_generic_remove(pci_dev, i40evf_dev_uninit);
}
This identical code appears in multiple drivers. Is there anything
stopping it being folded into rte_eth_dev_pci_generic_remove()?