> From: Amit Prakash Shukla [mailto:amitpraka...@marvell.com]
> Sent: Wednesday, 9 August 2023 08.09
> 
> This changeset adds support in DMA library to free source DMA buffer by
> hardware. On a supported hardware, application can pass on the mempool
> information as part of vchan config when the DMA transfer direction is
> configured as RTE_DMA_DIR_MEM_TO_DEV.

Isn't the DMA source buffer a memory area, and what needs to be freed is the 
mbuf holding the memory area, i.e. two different pointers?

I like the concept. Something similar might also be useful for 
RTE_DMA_DIR_MEM_TO_MEM, e.g. packet capture. Although such a use case might 
require decrementing the mbuf refcount instead of freeing the mbuf directly to 
the mempool.

PS: It has been a while since I looked at the DMA library, so ignore my 
comments if I got this wrong.

Reply via email to