08/10/2021 08:26, lihuisong (C): > As you mentioned, if we do not want the user to free rte_pci_device and > we want rte_pci_device > to be freed in time. Can we add a code logic calculating the number of > ports under a PCI address > and calling rte_dev_remove() in rte_eth_dev_close() to free > rte_pci_device and delete it from rte_pci_bus?
Yes that's the idea. But it cannot be done in ethdev lib, it should be the responsibility of the driver. Only the driver knows exactly what to free.