patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] vdpa/mlx5: fix steering update in virtq unset
@ 2020-07-27  8:07 Matan Azrad
  2020-07-28  9:44 ` Maxime Coquelin
  2020-07-28 15:48 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: Matan Azrad @ 2020-07-27  8:07 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, stable, Xueming Li

When a virtq is destroyed by the driver, it must be removed from the
steering RQT which holds its reference.

The driver didn't remove the virtq from RQT before destroying it what
caused HW syndrome in virtq unset.

Remove the virtq from RQT before destroying it.

Fixes: 9f09b1ca15c5 ("vdpa/mlx5: recreate a virtq becoming enabled")
Cc: stable@dpdk.org

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index 3e61264..19554f6 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -482,6 +482,13 @@
 		DRV_LOG(INFO, "Virtq %d was modified, recreate it.", index);
 	}
 	if (virtq->virtq) {
+		virtq->enable = 0;
+		if (is_virtq_recvq(virtq->index, priv->nr_virtqs)) {
+			ret = mlx5_vdpa_steer_update(priv);
+			if (ret)
+				DRV_LOG(WARNING, "Failed to disable steering "
+					"for virtq %d.", index);
+		}
 		ret = mlx5_vdpa_virtq_stop(priv, index);
 		if (ret)
 			DRV_LOG(WARNING, "Failed to stop virtq %d.", index);
@@ -493,14 +500,12 @@
 			DRV_LOG(ERR, "Failed to setup virtq %d.", index);
 			return ret;
 		}
-	}
-	virtq->enable = !!enable;
-	if (is_virtq_recvq(virtq->index, priv->nr_virtqs)) {
-		/* Need to add received virtq to the RQT table of the TIRs. */
-		ret = mlx5_vdpa_steer_update(priv);
-		if (ret) {
-			virtq->enable = !enable;
-			return ret;
+		virtq->enable = 1;
+		if (is_virtq_recvq(virtq->index, priv->nr_virtqs)) {
+			ret = mlx5_vdpa_steer_update(priv);
+			if (ret)
+				DRV_LOG(WARNING, "Failed to enable steering "
+					"for virtq %d.", index);
 		}
 	}
 	return 0;
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] vdpa/mlx5: fix steering update in virtq unset
  2020-07-27  8:07 [dpdk-stable] [PATCH] vdpa/mlx5: fix steering update in virtq unset Matan Azrad
@ 2020-07-28  9:44 ` Maxime Coquelin
  2020-07-28 15:48 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2020-07-28  9:44 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dev, stable, Xueming Li



On 7/27/20 10:07 AM, Matan Azrad wrote:
> When a virtq is destroyed by the driver, it must be removed from the
> steering RQT which holds its reference.
> 
> The driver didn't remove the virtq from RQT before destroying it what
> caused HW syndrome in virtq unset.
> 
> Remove the virtq from RQT before destroying it.
> 
> Fixes: 9f09b1ca15c5 ("vdpa/mlx5: recreate a virtq becoming enabled")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 21 +++++++++++++--------
>  1 file changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] vdpa/mlx5: fix steering update in virtq unset
  2020-07-27  8:07 [dpdk-stable] [PATCH] vdpa/mlx5: fix steering update in virtq unset Matan Azrad
  2020-07-28  9:44 ` Maxime Coquelin
@ 2020-07-28 15:48 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2020-07-28 15:48 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dev, stable, Xueming Li



On 7/27/20 10:07 AM, Matan Azrad wrote:
> When a virtq is destroyed by the driver, it must be removed from the
> steering RQT which holds its reference.
> 
> The driver didn't remove the virtq from RQT before destroying it what
> caused HW syndrome in virtq unset.
> 
> Remove the virtq from RQT before destroying it.
> 
> Fixes: 9f09b1ca15c5 ("vdpa/mlx5: recreate a virtq becoming enabled")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 21 +++++++++++++--------
>  1 file changed, 13 insertions(+), 8 deletions(-)


Applied to dpdk-next-virtio/master

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-28 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27  8:07 [dpdk-stable] [PATCH] vdpa/mlx5: fix steering update in virtq unset Matan Azrad
2020-07-28  9:44 ` Maxime Coquelin
2020-07-28 15:48 ` Maxime Coquelin

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