Skip to content

Commit 8e0751a

Browse files
dtatuleamstsirkin
authored andcommitted
vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready()
VQ indices in the range [cur_num_qps, max_vqs) represent queues that have not yet been activated. .set_vq_ready should not activate these VQs. Reviewed-by: Cosmin Ratiu <[email protected]> Acked-by: Eugenio Pérez <[email protected]> Signed-off-by: Dragos Tatulea <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 2638134 commit 8e0751a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/vdpa/mlx5/net/mlx5_vnet.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,6 +1575,9 @@ static int resume_vq(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mvq
15751575
if (!mvq->initialized)
15761576
return 0;
15771577

1578+
if (mvq->index >= ndev->cur_num_vqs)
1579+
return 0;
1580+
15781581
switch (mvq->fw_state) {
15791582
case MLX5_VIRTIO_NET_Q_OBJECT_STATE_INIT:
15801583
/* Due to a FW quirk we need to modify the VQ fields first then change state.

0 commit comments

Comments
 (0)