DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xia, Chenbo" <chenbo.xia@intel.com>
To: Matan Azrad <matan@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"stable@dpdk.org" <stable@dpdk.org>,
	Eli Britstein <elibr@nvidia.com>,
	Xueming Li <xuemingl@nvidia.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2] vdpa/mlx5: fix device unplug
Date: Tue, 18 May 2021 08:24:26 +0000	[thread overview]
Message-ID: <MN2PR11MB40636C557B9AFBE3809068889C2C9@MN2PR11MB4063.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210513184020.672589-1-matan@nvidia.com>

> -----Original Message-----
> From: stable <stable-bounces@dpdk.org> On Behalf Of Matan Azrad
> Sent: Friday, May 14, 2021 2:40 AM
> To: dev@dpdk.org
> Cc: maxime.coquelin@redhat.com; stable@dpdk.org; Eli Britstein
> <elibr@nvidia.com>; Xueming Li <xuemingl@nvidia.com>
> Subject: [dpdk-stable] [PATCH v2] vdpa/mlx5: fix device unplug
> 
> The vDPA PCI device unplug process should release all the private
> device resources and also to unregister the device.
> 
> The device unregistration was missed what remained the device data
> invalid in the rte_vhost library.
> 
> Unregister the device in unplug process via the remove operation.
> 
> Fixes: 95276abaaf0a ("vdpa/mlx5: introduce Mellanox vDPA driver")
> Cc: stable@dpdk.org
> 
> Reported-by: Eli Britstein <elibr@nvidia.com>
> Signed-off-by: Matan Azrad <matan@nvidia.com>
> Tested-by: Eli Britstein <elibr@nvidia.com>
> Acked-by: Xueming Li <xuemingl@nvidia.com>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> v2:
> fix spelling and email format
> 
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
> index 40db28b6db..e5e03e6582 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
> @@ -787,6 +787,8 @@ mlx5_vdpa_pci_remove(struct rte_pci_device *pci_dev)
>  			mlx5_glue->dv_free_var(priv->var);
>  			priv->var = NULL;
>  		}
> +		if (priv->vdev)
> +			rte_vdpa_unregister_device(priv->vdev);
>  		mlx5_glue->close_device(priv->ctx);
>  		pthread_mutex_destroy(&priv->vq_config_lock);
>  		rte_free(priv);
> --
> 2.25.1

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

  reply	other threads:[~2021-05-18  8:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 18:31 [dpdk-dev] [PATCH] " Matan Azrad
2021-05-13 18:40 ` [dpdk-dev] [PATCH v2] " Matan Azrad
2021-05-18  8:24   ` Xia, Chenbo [this message]
2021-05-18  8:27   ` [dpdk-dev] [dpdk-stable] " Xia, Chenbo

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=MN2PR11MB40636C557B9AFBE3809068889C2C9@MN2PR11MB4063.namprd11.prod.outlook.com \
    --to=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=elibr@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=xuemingl@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).