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

Xueming Li xuemingl at nvidia.com
Mon May 10 18:01:14 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 05/12/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/8d3f8b347f6c8c47b99d549db7875e15c975ba57

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8d3f8b347f6c8c47b99d549db7875e15c975ba57 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan at nvidia.com>
Date: Mon, 1 Mar 2021 10:41:31 +0000
Subject: [PATCH] vdpa/mlx5: fix virtq cleaning
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 846ec2ea75adc6ce00ad79485fca5d9943ebecaa ]

The HW virtq object can be destroyed either when the device is closed or
when the state of the virtq becomes disabled.

Some parameters of the virtq should continue to be managed when the
virtq state is changed but all of them must be initialized when the
device is closed.

Wrongly, the enable parameter stayed on when the device is closed what
might cause creation of invalid virtq in the next time a device is
assigned to the driver.

Clean all the virtqs memory when the device is closed.

Fixes: c47d6e83334e ("vdpa/mlx5: support queue update")

Signed-off-by: Matan Azrad <matan at nvidia.com>
Acked-by: Xueming Li <xuemingl at nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index 3e882e4000..87704c782b 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -103,13 +103,8 @@ mlx5_vdpa_virtqs_release(struct mlx5_vdpa_priv *priv)
 	for (i = 0; i < priv->nr_virtqs; i++) {
 		virtq = &priv->virtqs[i];
 		mlx5_vdpa_virtq_unset(virtq);
-		if (virtq->counters) {
+		if (virtq->counters)
 			claim_zero(mlx5_devx_cmd_destroy(virtq->counters));
-			virtq->counters = NULL;
-			memset(&virtq->reset, 0, sizeof(virtq->reset));
-		}
-		memset(virtq->err_time, 0, sizeof(virtq->err_time));
-		virtq->n_retry = 0;
 	}
 	for (i = 0; i < priv->num_lag_ports; i++) {
 		if (priv->tiss[i]) {
@@ -126,6 +121,7 @@ mlx5_vdpa_virtqs_release(struct mlx5_vdpa_priv *priv)
 		priv->virtq_db_addr = NULL;
 	}
 	priv->features = 0;
+	memset(priv->virtqs, 0, sizeof(*virtq) * priv->nr_virtqs);
 	priv->nr_virtqs = 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.844863400 +0800
+++ 0126-vdpa-mlx5-fix-virtq-cleaning.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From 846ec2ea75adc6ce00ad79485fca5d9943ebecaa Mon Sep 17 00:00:00 2001
+From 8d3f8b347f6c8c47b99d549db7875e15c975ba57 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 846ec2ea75adc6ce00ad79485fca5d9943ebecaa ]
@@ -20 +22,0 @@
-Cc: stable at dpdk.org
@@ -30 +32 @@
-index ef2642a656..024c5c4180 100644
+index 3e882e4000..87704c782b 100644


More information about the stable mailing list