Skip to content

Commit 3fe0241

Browse files
dtatuleamstsirkin
authored andcommitted
vdpa/mlx5: Correct default number of queues when MQ is on
The standard specifies that the initial number of queues is the default, which is 1 (1 tx, 1 rx). Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <20230727172354.68243-2-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com>
1 parent df95570 commit 3fe0241

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/vdpa/mlx5/net/mlx5_vnet.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2517,7 +2517,15 @@ static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features)
25172517
else
25182518
ndev->rqt_size = 1;
25192519

2520-
ndev->cur_num_vqs = 2 * ndev->rqt_size;
2520+
/* Device must start with 1 queue pair, as per VIRTIO v1.2 spec, section
2521+
* 5.1.6.5.5 "Device operation in multiqueue mode":
2522+
*
2523+
* Multiqueue is disabled by default.
2524+
* The driver enables multiqueue by sending a command using class
2525+
* VIRTIO_NET_CTRL_MQ. The command selects the mode of multiqueue
2526+
* operation, as follows: ...
2527+
*/
2528+
ndev->cur_num_vqs = 2;
25212529

25222530
update_cvq_info(mvdev);
25232531
return err;

0 commit comments

Comments
 (0)