[RFC 2/2] vduse: lift restriction about net devices with CVQ

Eugenio Pérez posted 2 patches 4 months ago
[RFC 2/2] vduse: lift restriction about net devices with CVQ
Posted by Eugenio Pérez 4 months ago
Now that the virtio_net driver is able to recover from a stall
virtqueue, let's lift the restriction.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 drivers/vdpa/vdpa_user/vduse_dev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
index e7bced0b5542..95d2b898171d 100644
--- a/drivers/vdpa/vdpa_user/vduse_dev.c
+++ b/drivers/vdpa/vdpa_user/vduse_dev.c
@@ -1726,9 +1726,6 @@ static bool features_is_valid(struct vduse_dev_config *config)
 	if ((config->device_id == VIRTIO_ID_BLOCK) &&
 			(config->features & BIT_ULL(VIRTIO_BLK_F_CONFIG_WCE)))
 		return false;
-	else if ((config->device_id == VIRTIO_ID_NET) &&
-			(config->features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ)))
-		return false;
 
 	if ((config->device_id == VIRTIO_ID_NET) &&
 			!(config->features & BIT_ULL(VIRTIO_F_VERSION_1)))
-- 
2.51.0

Re: [RFC 2/2] vduse: lift restriction about net devices with CVQ
Posted by Michael S. Tsirkin 3 months, 3 weeks ago
On Tue, Oct 07, 2025 at 03:06:22PM +0200, Eugenio Pérez wrote:
> Now that the virtio_net driver is able to recover from a stall
> virtqueue,

it's not able to recover, is it?

> let's lift the restriction.
> 
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> ---
>  drivers/vdpa/vdpa_user/vduse_dev.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
> index e7bced0b5542..95d2b898171d 100644
> --- a/drivers/vdpa/vdpa_user/vduse_dev.c
> +++ b/drivers/vdpa/vdpa_user/vduse_dev.c
> @@ -1726,9 +1726,6 @@ static bool features_is_valid(struct vduse_dev_config *config)
>  	if ((config->device_id == VIRTIO_ID_BLOCK) &&
>  			(config->features & BIT_ULL(VIRTIO_BLK_F_CONFIG_WCE)))
>  		return false;
> -	else if ((config->device_id == VIRTIO_ID_NET) &&
> -			(config->features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ)))
> -		return false;
>  
>  	if ((config->device_id == VIRTIO_ID_NET) &&
>  			!(config->features & BIT_ULL(VIRTIO_F_VERSION_1)))
> -- 
> 2.51.0
Re: [RFC 2/2] vduse: lift restriction about net devices with CVQ
Posted by Maxime Coquelin 4 months ago

On 10/7/25 3:06 PM, Eugenio Pérez wrote:
> Now that the virtio_net driver is able to recover from a stall
> virtqueue, let's lift the restriction.
> 
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> ---
>   drivers/vdpa/vdpa_user/vduse_dev.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
> index e7bced0b5542..95d2b898171d 100644
> --- a/drivers/vdpa/vdpa_user/vduse_dev.c
> +++ b/drivers/vdpa/vdpa_user/vduse_dev.c
> @@ -1726,9 +1726,6 @@ static bool features_is_valid(struct vduse_dev_config *config)
>   	if ((config->device_id == VIRTIO_ID_BLOCK) &&
>   			(config->features & BIT_ULL(VIRTIO_BLK_F_CONFIG_WCE)))
>   		return false;
> -	else if ((config->device_id == VIRTIO_ID_NET) &&
> -			(config->features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ)))
> -		return false;
>   
>   	if ((config->device_id == VIRTIO_ID_NET) &&
>   			!(config->features & BIT_ULL(VIRTIO_F_VERSION_1)))

I wonder whether the API version should be increased, otherwise I don't
see how the app creating the VDUSE device knows whether it can safely
advertises the CVQ support (except without doing trial and error).