]> git.ipfire.org Git - thirdparty/qemu.git/commit
net: Add get_acked_features callback to VhostNetOptions
authorLaurent Vivier <lvivier@redhat.com>
Wed, 9 Jul 2025 08:24:20 +0000 (10:24 +0200)
committerJason Wang <jasowang@redhat.com>
Mon, 14 Jul 2025 05:27:09 +0000 (13:27 +0800)
commitbd38794a1119ec8e3f0a7473458ce4cdd229bc42
tree6e264376152bf678bd825bbaf463154d5d237317
parenteffdacbf28d76ca0eec9086539649e547e510bbc
net: Add get_acked_features callback to VhostNetOptions

This patch continues the effort to decouple the generic vhost layer
from specific network backend implementations.

Previously, the vhost_net initialization code contained a hardcoded
check for the vhost-user client type to retrieve its acked features
by calling vhost_user_get_acked_features(). This exposed an
internal vhost-user function in a public header and coupled the two
modules.

The vhost-user backend is updated to provide a callback, and its
getter function is now static. The call site in vhost_net.c is
simplified to use the new generic helper, removing the type check and
the direct dependency.

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