* [PATCH] vdpa/mlx5: Correct default number of queues when MQ is on
@ 2023-07-27 17:23 Dragos Tatulea
2023-07-28 1:39 ` Jason Wang
0 siblings, 1 reply; 3+ messages in thread
From: Dragos Tatulea @ 2023-07-27 17:23 UTC (permalink / raw)
To: Michael S. Tsirkin, Jason Wang, Xuan Zhuo
Cc: Dragos Tatulea, Eugenio Pérez, virtualization, linux-kernel
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>
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 9138ef2fb2c8..6b6eb69a8a90 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -2517,7 +2517,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;
--
2.41.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vdpa/mlx5: Correct default number of queues when MQ is on
2023-07-27 17:23 [PATCH] vdpa/mlx5: Correct default number of queues when MQ is on Dragos Tatulea
@ 2023-07-28 1:39 ` Jason Wang
2023-08-02 0:29 ` Lei Yang
0 siblings, 1 reply; 3+ messages in thread
From: Jason Wang @ 2023-07-28 1:39 UTC (permalink / raw)
To: Dragos Tatulea
Cc: Michael S. Tsirkin, Xuan Zhuo, Eugenio Pérez,
virtualization, linux-kernel
On Fri, Jul 28, 2023 at 1:25 AM Dragos Tatulea <dtatulea@nvidia.com> wrote:
>
> 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>
Acked-by: Jason Wang <jasowang@redhat.com>
Thanks
> ---
> drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 9138ef2fb2c8..6b6eb69a8a90 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -2517,7 +2517,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;
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vdpa/mlx5: Correct default number of queues when MQ is on
2023-07-28 1:39 ` Jason Wang
@ 2023-08-02 0:29 ` Lei Yang
0 siblings, 0 replies; 3+ messages in thread
From: Lei Yang @ 2023-08-02 0:29 UTC (permalink / raw)
To: Dragos Tatulea
Cc: Michael S. Tsirkin, Xuan Zhuo, Eugenio Pérez,
virtualization, linux-kernel, Jason Wang
QE performed sanity testing on this patch using a real nic's
vhost_vdpa device with multi queues, everything works fine.
Tested-by: Lei Yang <leiyang@redhat.com>
On Fri, Jul 28, 2023 at 9:42 AM Jason Wang <jasowang@redhat.com> wrote:
>
> On Fri, Jul 28, 2023 at 1:25 AM Dragos Tatulea <dtatulea@nvidia.com> wrote:
> >
> > 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>
>
> Acked-by: Jason Wang <jasowang@redhat.com>
>
> Thanks
>
> > ---
> > drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 +++++++++-
> > 1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > index 9138ef2fb2c8..6b6eb69a8a90 100644
> > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > @@ -2517,7 +2517,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;
> > --
> > 2.41.0
> >
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-02 0:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-27 17:23 [PATCH] vdpa/mlx5: Correct default number of queues when MQ is on Dragos Tatulea
2023-07-28 1:39 ` Jason Wang
2023-08-02 0:29 ` Lei Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®