When testing using ASAN or valgrind with DPDK; there are lots of leftover memory and file descriptors. This makes it hard to find application leaks versus internal DPDK leaks.
The DPDK has a function that applications can use to tell it to cleanup resources on shutdown (rte_eal_cleanup). But the current coverage of that API is spotty. Many internal parts of DPDK leave files and allocated memory behind. This patch set is a first step at getting the sub-parts of DPDK to cleanup after themselves. These are the easier ones, the harder and more critical ones are in the drivers and the memory subsystem. There should be no new exposed API or ABI changes here. v6 - fix windows stub v5 - add stub for windows build in rte_malloc cleanup v4 - rebase to 20.11-rc - drop one patch (alarm cleanup is implemented) - drop patch that ends worker threads on cleanup. the test is calling rte_exit/eal_cleanup in a forked process. (could argue this is a test bug)! Stephen Hemminger (5): eal: close log in eal_cleanup eal: mp: end the multiprocess thread during cleanup eal: vfio: cleanup the mp sync handle eal: hotplug: cleanup multiprocess resources eal: malloc: cleanup mp resources lib/eal/common/eal_common_log.c | 13 +++++++++++++ lib/eal/common/eal_common_proc.c | 20 +++++++++++++++++--- lib/eal/common/eal_private.h | 7 +++++++ lib/eal/common/hotplug_mp.c | 5 +++++ lib/eal/common/hotplug_mp.h | 6 ++++++ lib/eal/common/malloc_heap.c | 6 ++++++ lib/eal/common/malloc_heap.h | 3 +++ lib/eal/common/malloc_mp.c | 12 ++++++++++++ lib/eal/common/malloc_mp.h | 3 +++ lib/eal/linux/eal.c | 7 +++++++ lib/eal/linux/eal_log.c | 8 ++++++++ lib/eal/linux/eal_vfio.h | 1 + lib/eal/linux/eal_vfio_mp_sync.c | 8 ++++++++ lib/eal/windows/eal_mp.c | 7 +++++++ 14 files changed, 103 insertions(+), 3 deletions(-) -- 2.30.2