[v1,20/21] net/virtio-user: advertize control VQ support with vDPA
Checks
Commit Message
This patch advertizes control virtqueue support by the vDPA
backend if it supports VIRTIO_NET_F_CTRL_VQ.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_user/vhost_vdpa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Wednesday, November 30, 2022 11:57 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>;
> david.marchand@redhat.com; eperezma@redhat.com
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: [PATCH v1 20/21] net/virtio-user: advertize control VQ support
> with vDPA
>
> This patch advertizes control virtqueue support by the vDPA
> backend if it supports VIRTIO_NET_F_CTRL_VQ.
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
> drivers/net/virtio/virtio_user/vhost_vdpa.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio/virtio_user/vhost_vdpa.c
> b/drivers/net/virtio/virtio_user/vhost_vdpa.c
> index 3fd13d9fac..7bb4995893 100644
> --- a/drivers/net/virtio/virtio_user/vhost_vdpa.c
> +++ b/drivers/net/virtio/virtio_user/vhost_vdpa.c
> @@ -135,8 +135,8 @@ vhost_vdpa_get_features(struct virtio_user_dev *dev,
> uint64_t *features)
> return -1;
> }
>
> - /* Multiqueue not supported for now */
> - *features &= ~(1ULL << VIRTIO_NET_F_MQ);
> + if (*features & 1ULL << VIRTIO_NET_F_CTRL_VQ)
> + dev->hw_cvq = true;
>
> /* Negotiated vDPA backend features */
> ret = vhost_vdpa_get_protocol_features(dev, &data-
> >protocol_features);
> --
> 2.38.1
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
@@ -135,8 +135,8 @@ vhost_vdpa_get_features(struct virtio_user_dev *dev, uint64_t *features)
return -1;
}
- /* Multiqueue not supported for now */
- *features &= ~(1ULL << VIRTIO_NET_F_MQ);
+ if (*features & 1ULL << VIRTIO_NET_F_CTRL_VQ)
+ dev->hw_cvq = true;
/* Negotiated vDPA backend features */
ret = vhost_vdpa_get_protocol_features(dev, &data->protocol_features);