On Wed, Jun 18, 2025 at 11:57 PM Laurent Vivier <lviv...@redhat.com> wrote:
>
> Currently, several parts of the codebase check if a network client is a
> vhost-user backend by directly comparing its type against the
> NET_CLIENT_DRIVER_VHOST_USER enum. This creates a tight coupling
> between virtio/vhost-net drivers and the internal implementation
> details of the vhost-user net client.
>
> To improve abstraction and reduce this coupling, this patch introduces a
> new helper function, qemu_is_vhost_user(). This function allows
> callers to query if a client is of the vhost-user type without
> needing to know about the specific enum value.

I'm not sure it's worth doing the change, for example, it works only
for vhost-user, and the rest are still being done via the enum.

Thanks


Reply via email to