Commit 3fe02419 authored by Dragos Tatulea's avatar Dragos Tatulea Committed by Michael S. Tsirkin
Browse files

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: default avatarDragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: default avatarEugenio Pérez <eperezma@redhat.com>
Message-Id: <20230727172354.68243-2-dtatulea@nvidia.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Tested-by: default avatarLei Yang <leiyang@redhat.com>
parent df955704
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -2517,7 +2517,15 @@ static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features)
	else
	else
		ndev->rqt_size = 1;
		ndev->rqt_size = 1;


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


	update_cvq_info(mvdev);
	update_cvq_info(mvdev);
	return err;
	return err;