]> git.ipfire.org Git - thirdparty/qemu.git/commit
net: Consolidate vhost feature bits into vhost_net structure
authorLaurent Vivier <lvivier@redhat.com>
Wed, 9 Jul 2025 08:24:19 +0000 (10:24 +0200)
committerJason Wang <jasowang@redhat.com>
Mon, 14 Jul 2025 05:27:09 +0000 (13:27 +0800)
commiteffdacbf28d76ca0eec9086539649e547e510bbc
tree6a631996bcf35b5d59237e904d7829a15a05198a
parent8f6e5c620a5b21c070eed93721236cad48b6f9d7
net: Consolidate vhost feature bits into vhost_net structure

Previously, the vhost_net_get_feature_bits() function in
hw/net/vhost_net.c used a large switch statement to determine
the appropriate feature bits based on the NetClientDriver type.

This created unnecessary coupling between the generic vhost layer
and specific network backends (like TAP, vhost-user, and
vhost-vdpa).

This patch moves the definition of vhost feature bits directly into the
vhost_net structure for each relevant network client.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/vhost_net.c
include/hw/virtio/vhost.h
include/net/vhost-vdpa.h
include/net/vhost_net.h
net/tap.c
net/vhost-user.c
net/vhost-vdpa.c