mbox

[0/5] Fix IDXD PCI device close

Message ID 20220408141504.1319913-1-kevin.laatz@intel.com (mailing list archive)
Headers

Message

Kevin Laatz April 8, 2022, 2:14 p.m. UTC
  This patchset addresses the device close for IDXD PCI devices.
Initially, there was a memory leak reported by ASAN for the 'pci' member
of the 'idxd_dmadev' struct due to a missing free. In addition, this
patch set corrects the behaviour of the device close function to ensure
the cleanup is completed as expected.

Applications which use DMA devices should call rte_dma_close() for each
device probed in order to ensure proper cleanup of the devices. This has
been added to applications where DMA devices are commonly used.

Kevin Laatz (5):
  dma/idxd: fix memory leak in pci close
  dma/idxd: fix memory leak due to free on incorrect pointer
  app/test: close dma devices during cleanup
  app/testpmd: stop and close dmadevs at exit
  examples/dma: fix missing dma close

 app/test-pmd/testpmd.c           |  9 ++++++++
 app/test/test.c                  |  6 ++++++
 drivers/dma/idxd/idxd_common.c   |  1 +
 drivers/dma/idxd/idxd_internal.h |  2 ++
 drivers/dma/idxd/idxd_pci.c      | 36 +++++++++++++++++++++++++-------
 examples/dma/dmafwd.c            |  6 ++++++
 6 files changed, 52 insertions(+), 8 deletions(-)