patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] vdpa/mlx5: workaround queue stop with traffic
@ 2021-11-22 13:12 Matan Azrad
  2022-01-26 13:20 ` Maxime Coquelin
  2022-01-27  5:10 ` Xia, Chenbo
  0 siblings, 2 replies; 3+ messages in thread
From: Matan Azrad @ 2021-11-22 13:12 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, stable, Xueming Li

When the event thread polls traffic and a virtq is stopping, the FW loses
synchronization in the virtq indexes.

It causes LM failure on synchronization between the HOST indexes to
the GUEST indexes.

Unset the event thread before the queue stop in the LM process.

Fixes: 31b9c29c86af ("vdpa/mlx5: support close and config operations")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index b9e84dd9bf..8dfaba791d 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -250,10 +250,10 @@ mlx5_vdpa_dev_close(int vid)
 		DRV_LOG(ERR, "Invalid vDPA device: %s.", vdev->device->name);
 		return -1;
 	}
-	if (priv->configured)
-		ret |= mlx5_vdpa_lm_log(priv);
 	mlx5_vdpa_err_event_unset(priv);
 	mlx5_vdpa_cqe_event_unset(priv);
+	if (priv->configured)
+		ret |= mlx5_vdpa_lm_log(priv);
 	mlx5_vdpa_steer_unset(priv);
 	mlx5_vdpa_virtqs_release(priv);
 	mlx5_vdpa_event_qp_global_release(priv);
-- 
2.25.1


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

* Re: [PATCH] vdpa/mlx5: workaround queue stop with traffic
  2021-11-22 13:12 [PATCH] vdpa/mlx5: workaround queue stop with traffic Matan Azrad
@ 2022-01-26 13:20 ` Maxime Coquelin
  2022-01-27  5:10 ` Xia, Chenbo
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2022-01-26 13:20 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dev, stable, Xueming Li



On 11/22/21 14:12, Matan Azrad wrote:
> When the event thread polls traffic and a virtq is stopping, the FW loses
> synchronization in the virtq indexes.
> 
> It causes LM failure on synchronization between the HOST indexes to
> the GUEST indexes.
> 
> Unset the event thread before the queue stop in the LM process.
> 
> Fixes: 31b9c29c86af ("vdpa/mlx5: support close and config operations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matan Azrad <matan@nvidia.com>
> Acked-by: Xueming Li <xuemingl@nvidia.com>
> ---
>   drivers/vdpa/mlx5/mlx5_vdpa.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
> index b9e84dd9bf..8dfaba791d 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
> @@ -250,10 +250,10 @@ mlx5_vdpa_dev_close(int vid)
>   		DRV_LOG(ERR, "Invalid vDPA device: %s.", vdev->device->name);
>   		return -1;
>   	}
> -	if (priv->configured)
> -		ret |= mlx5_vdpa_lm_log(priv);
>   	mlx5_vdpa_err_event_unset(priv);
>   	mlx5_vdpa_cqe_event_unset(priv);
> +	if (priv->configured)
> +		ret |= mlx5_vdpa_lm_log(priv);
>   	mlx5_vdpa_steer_unset(priv);
>   	mlx5_vdpa_virtqs_release(priv);
>   	mlx5_vdpa_event_qp_global_release(priv);

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

Thanks,
Maxime


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

* RE: [PATCH] vdpa/mlx5: workaround queue stop with traffic
  2021-11-22 13:12 [PATCH] vdpa/mlx5: workaround queue stop with traffic Matan Azrad
  2022-01-26 13:20 ` Maxime Coquelin
@ 2022-01-27  5:10 ` Xia, Chenbo
  1 sibling, 0 replies; 3+ messages in thread
From: Xia, Chenbo @ 2022-01-27  5:10 UTC (permalink / raw)
  To: Matan Azrad, Maxime Coquelin; +Cc: dev, stable, Xueming Li

> -----Original Message-----
> From: Matan Azrad <matan@nvidia.com>
> Sent: Monday, November 22, 2021 9:13 PM
> To: Maxime Coquelin <maxime.coquelin@redhat.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Xueming Li <xuemingl@nvidia.com>
> Subject: [PATCH] vdpa/mlx5: workaround queue stop with traffic
> 
> When the event thread polls traffic and a virtq is stopping, the FW loses
> synchronization in the virtq indexes.
> 
> It causes LM failure on synchronization between the HOST indexes to
> the GUEST indexes.
> 
> Unset the event thread before the queue stop in the LM process.
> 
> Fixes: 31b9c29c86af ("vdpa/mlx5: support close and config operations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matan Azrad <matan@nvidia.com>
> Acked-by: Xueming Li <xuemingl@nvidia.com>
> ---
> --
> 2.25.1

Applied to next-virtio/main, thanks


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

end of thread, other threads:[~2022-01-27  5:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 13:12 [PATCH] vdpa/mlx5: workaround queue stop with traffic Matan Azrad
2022-01-26 13:20 ` Maxime Coquelin
2022-01-27  5:10 ` Xia, Chenbo

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