Re: [PATCH 02/33] vhost: drop backend_features field

Cc: libvirt Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> writes:
This field is mostly unused and sometimes confusing (we even have a TODO-like comment to drop it). Let's finally do.
The field is used to held VHOST_USER_F_PROTOCOL_FEATURES for vhost-user and/or VHOST_NET_F_VIRTIO_NET_HDR for vhost-net (which may be vhoust-user-net). But we can simply recalculte these two flags inplace from hdev->features, and from net-client for VHOST_NET_F_VIRTIO_NET_HDR.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
[...]
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 66be6afc88..9f9dd2d46d 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -100,16 +100,9 @@ struct vhost_dev { * * @features: available features provided by the backend * @acked_features: final negotiated features with front-end driver - * - * @backend_features: this is used in a couple of places to either - * store VHOST_USER_F_PROTOCOL_FEATURES to apply to - * VHOST_USER_SET_FEATURES or VHOST_NET_F_VIRTIO_NET_HDR. Its - * future use should be discouraged and the variable retired as - * its easy to confuse with the VirtIO backend_features.
I guess this is the TODO-like comment mentioned in the commit message.
*/ uint64_t features; uint64_t acked_features; - uint64_t backend_features;
/** * @protocol_features: is the vhost-user only feature set by diff --git a/qapi/virtio.json b/qapi/virtio.json index 9d652fe4a8..0aae77340d 100644 --- a/qapi/virtio.json +++ b/qapi/virtio.json @@ -85,8 +85,6 @@ # # @acked-features: vhost_dev acked_features # -# @backend-features: vhost_dev backend_features -# # @protocol-features: vhost_dev protocol_features # # @max-queues: vhost_dev max_queues @@ -106,7 +104,6 @@ 'vq-index': 'int', 'features': 'VirtioDeviceFeatures', 'acked-features': 'VirtioDeviceFeatures', - 'backend-features': 'VirtioDeviceFeatures', 'protocol-features': 'VhostDeviceProtocols', 'max-queues': 'uint64', 'backend-cap': 'uint64',
Incompatible change. We can do this because it's only visible in the return value of x-query-virtio-status, which is unstable. Recommend to note this in the commit message. Acked-by: Markus Armbruster <armbru@redhat.com>
participants (1)
-
Markus Armbruster