07/09/2021 05:41, Huisong Li:
Calling rte_eth_dev_close() will release resources of eth device and close
it. But rte_pci_device struct isn't released when app exit, which will lead
to memory leak.
That's a PMD issue.
When the last port of a PCI device is closed, the device should be freed.
+ /* Retrieve device address in eth device before closing it. */
+ eth_dev = &rte_eth_devices[portid];
You should not access this array, considered internal.
quoted hunk ↗ jump to hunk
+ rte_dev = eth_dev->device;
rte_eth_dev_close(portid);
+ ret = rte_dev_remove(rte_dev);