From: Matan Azrad Date: Mon, 22 Nov 2021 13:12:35 +0000 (+0200) Subject: vdpa/mlx5: workaround queue stop with traffic X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b5e51edfbe18ee30b8fed5efdb09f2ab4c8a05a0;p=dpdk.git 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 Acked-by: Xueming Li Reviewed-by: Maxime Coquelin --- 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);