[dpdk-stable] patch 'vdpa/mlx5: fix device unplug' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:04:20 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a6967ee4a8cb1be554f2ff9d3c9ba794eef16aee

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From a6967ee4a8cb1be554f2ff9d3c9ba794eef16aee Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan at nvidia.com>
Date: Thu, 13 May 2021 21:40:20 +0300
Subject: [PATCH] vdpa/mlx5: fix device unplug
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 2838aa76ba94e0dd7712e57fe6a32651f5690797 ]

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")

Reported-by: Eli Britstein <elibr at nvidia.com>
Signed-off-by: Matan Azrad <matan at nvidia.com>
Tested-by: Eli Britstein <elibr at nvidia.com>
Acked-by: Xueming Li <xuemingl at nvidia.com>
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 228f5f59d2..6029cfc3a8 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -805,6 +805,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

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.749240000 +0800
+++ 0166-vdpa-mlx5-fix-device-unplug.patch	2021-06-12 06:53:56.650000000 +0800
@@ -1 +1 @@
-From 2838aa76ba94e0dd7712e57fe6a32651f5690797 Mon Sep 17 00:00:00 2001
+From a6967ee4a8cb1be554f2ff9d3c9ba794eef16aee Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 2838aa76ba94e0dd7712e57fe6a32651f5690797 ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org
@@ -27 +29 @@
-index 40db28b6db..e5e03e6582 100644
+index 228f5f59d2..6029cfc3a8 100644
@@ -30 +32 @@
-@@ -787,6 +787,8 @@ mlx5_vdpa_pci_remove(struct rte_pci_device *pci_dev)
+@@ -805,6 +805,8 @@ mlx5_vdpa_pci_remove(struct rte_pci_device *pci_dev)


More information about the stable mailing list