On Wed, Jul 5, 2023 at 3:22 PM Maxime Coquelin
<maxime.coque...@redhat.com> wrote:
> @@ -950,9 +954,14 @@ rte_vhost_driver_register(const char *path, uint64_t 
> flags)
>          * two values.
>          */
>         vsocket->use_builtin_virtio_net = true;
> -       vsocket->supported_features = VIRTIO_NET_SUPPORTED_FEATURES;
> -       vsocket->features           = VIRTIO_NET_SUPPORTED_FEATURES;
> -       vsocket->protocol_features  = VHOST_USER_PROTOCOL_FEATURES;
> +       if (vsocket->is_vduse) {
> +               vsocket->supported_features = VDUSE_NET_SUPPORTED_FEATURES;
> +               vsocket->features           = VDUSE_NET_SUPPORTED_FEATURES;
> +       } else {
> +               vsocket->supported_features = VIRTIO_NET_SUPPORTED_FEATURES;
> +               vsocket->features           = VIRTIO_NET_SUPPORTED_FEATURES;
> +               vsocket->protocol_features  = VHOST_USER_PROTOCOL_FEATURES;
> +       }
>

Would it make sense to split those features in a set of features
shared by vhost-user and vduse, and one dedicated set for each of
them?
For example, the VIRTIO_NET_F_GUEST/HOST_* features are not bound to
vhost-user / vduse, are they?


-- 
David Marchand

Reply via email to