diff options
Diffstat (limited to 'hw/net/vhost_net.c')
| -rw-r--r-- | hw/net/vhost_net.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index fb169af0e8..976d2b315a 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -16,7 +16,6 @@ #include "qemu/osdep.h" #include "net/net.h" #include "net/tap.h" -#include "net/vhost-user.h" #include "net/vhost-vdpa.h" #include "standard-headers/linux/vhost_types.h" @@ -70,11 +69,11 @@ uint64_t vhost_net_get_acked_features(VHostNetState *net) void vhost_net_save_acked_features(NetClientState *nc) { -#ifdef CONFIG_VHOST_NET_USER - if (nc->info->type == NET_CLIENT_DRIVER_VHOST_USER) { - vhost_user_save_acked_features(nc); + struct vhost_net *net = get_vhost_net(nc); + + if (net && net->save_acked_features) { + net->save_acked_features(nc); } -#endif } static void vhost_net_disable_notifiers_nvhosts(VirtIODevice *dev, @@ -245,6 +244,7 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options) net->nc = options->net_backend; net->dev.nvqs = options->nvqs; net->feature_bits = options->feature_bits; + net->save_acked_features = options->save_acked_features; net->dev.max_queues = 1; net->dev.vqs = net->vqs; |