Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device
From: Thomas Monjalon <hidden>
Date: 2021-10-08 06:29:27
From: Thomas Monjalon <hidden>
Date: 2021-10-08 06:29:27
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.