vdpa/mlx5: Avoid executing set_vq_ready() if device is reset
Jason Wang
Acked-byQuoted 7 lines · Eli Cohen
Avoid executing
set_vq_ready()if the device has been reset. In such case, the features are cleared and cannot be used in conditional statements. Such reference happens is the functionctrl_vq_idx().Fixes 9c90709cf8e7 ("vdpa/mlx5: Add multiqueue support")Signed-off-by Eli Cohen <[email protected]>
Acked-by Jason Wang <[email protected]>
Quoted 19 lines
--- drivers/vdpa/mlx5/net/mlx5_vnet.c | 3 +++ 1 file changed, 3 insertions(+)drivers/vdpa/mlx5/net/mlx5_vnet.c +3
-1@@ -1714,6 +1714,9 @@ static void mlx5_vdpa_set_vq_ready(struct vdpa_device *vdev, u16 idx, bool readystruct mlx5_vdpa_net *ndev =to_mlx5_vdpa_ndev (mvdev);struct mlx5_vdpa_virtqueue *mvq; +if (!mvdev->actual_features) +return ; +if (!is_index_valid (mvdev, idx))return ; --
Quoted 2 lines
2.32.0
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization