[PATCH 1/2] vhost: fix vduse features negotiation
David Marchand
david.marchand at redhat.com
Wed Jul 5 15:36:23 CEST 2023
On Wed, Jul 5, 2023 at 3:22 PM Maxime Coquelin
<maxime.coquelin at 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
More information about the dev
mailing list