patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: Jiawei Wang <jiaweiw@nvidia.com>,
	viacheslavo@nvidia.com,  shahafs@nvidia.com, matan@nvidia.com,
	stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH 19.11] net/mlx5: free MR resource on device DMA unmap
Date: Tue, 24 Nov 2020 11:06:00 +0000
Message-ID: <ecd6898d801c56a92ee8fe0a10fc3144d1a29630.camel@debian.org> (raw)
In-Reply-To: <1606153965-90811-1-git-send-email-jiaweiw@nvidia.com>

On Mon, 2020-11-23 at 19:52 +0200, Jiawei Wang wrote:
> [ upstream commit 992e6df3dafebf0625a59a51136a5e07a361000f ]
> 
> 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.
> 
> Fixes: 989e999d9305 ("net/mlx5: support PCI device DMA map and unmap")
> 
> Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
> ---
>  drivers/net/mlx5/mlx5_mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
> index 0d549b6..54a11bd 100644
> --- a/drivers/net/mlx5/mlx5_mr.c
> +++ b/drivers/net/mlx5/mlx5_mr.c
> @@ -1408,7 +1408,7 @@ struct mr_update_mp_data {
>  		return -1;
>  	}
>  	LIST_REMOVE(mr, mr);
> -	LIST_INSERT_HEAD(&sh->mr.mr_free_list, mr, mr);
> +	mr_free(mr);
>  	DEBUG("port %u remove MR(%p) from list", dev->data->port_id,
>  	      (void *)mr);
>  	mr_rebuild_dev_cache(sh);

Thanks, applied and pushed

-- 
Kind regards,
Luca Boccassi

  reply	other threads:[~2020-11-24 11:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 17:52 Jiawei Wang
2020-11-24 11:06 ` Luca Boccassi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-11-23 17:14 Jiawei Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ecd6898d801c56a92ee8fe0a10fc3144d1a29630.camel@debian.org \
    --to=bluca@debian.org \
    --cc=jiaweiw@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git