> -----Original Message-----
> From: Jiawei Wang <jiaw...@nvidia.com>
> Sent: Wednesday, October 28, 2020 15:14
> To: Slava Ovsiienko <viachesl...@nvidia.com>; Matan Azrad
> <ma...@nvidia.com>; Shahaf Shuler <shah...@nvidia.com>; Ori Kam
> <or...@nvidia.com>
> Cc: dev@dpdk.org; Raslan Darawsheh <rasl...@nvidia.com>; sta...@dpdk.org
> Subject: [PATCH] common/mlx5: free MR resource while device DMA unmap
>
> mlx5 PMD created the MR (Memory Region) resource on the mlx5_dma_map
> call to make the memory available for DMA operations. On the
> mlx5_dma_unmap call the MR resource was not freed but inserted to MR Free
> list for further garbage collection.
> Actual MR resource destroying happened on device stop call. That caused the
> runtime out of memory in case of application performed multiple DMA
> map/unmap calls.
>
> The fix immediately frees the MR resource on mlx5_dma_unmap call not
> engaging the list. The export for mlx5_mr_free function from common PMD
> part is added as well.
>
> Redmine: 2330226
> Fixes: 989e999d9305 ("net/mlx5: support PCI device DMA map and unmap")
> Cc: sta...@dpdk.org
>
> Signed-off-by: Jiawei Wang <jiaw...@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viachesl...@nvidia.com>