Patch "vdpa/mlx5: Correct default number of queues when MQ is on" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    vdpa/mlx5: Correct default number of queues when MQ is on

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     vdpa-mlx5-correct-default-number-of-queues-when-mq-i.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 460b08b3b61845ffba18a6f224020bc18747d729
Author: Dragos Tatulea <dtatulea@xxxxxxxxxx>
Date:   Thu Jul 27 20:23:46 2023 +0300

    vdpa/mlx5: Correct default number of queues when MQ is on
    
    [ Upstream commit 3fe024193340b225d1fd410d78c495434a9d68e0 ]
    
    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@xxxxxxxxxx>
    Reviewed-by: Eugenio Pérez <eperezma@xxxxxxxxxx>
    Message-Id: <20230727172354.68243-2-dtatulea@xxxxxxxxxx>
    Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Acked-by: Jason Wang <jasowang@xxxxxxxxxx>
    Tested-by: Lei Yang <leiyang@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index f18a9301ab94e..6b79ae746ab93 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -2447,7 +2447,15 @@ static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features)
 	else
 		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);
 	return err;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux