- target/arm: Fix kvm probe of ID_AA64ZFR0 - migration: report migration/multiFd related thread pid to libvirt - vhost_net: keep acked_feature only for NET_CLIENT_DRIVER_VHOST_USER Signed-off-by: yezengruan <yezengruan@huawei.com> (cherry picked from commit 2d46526fa69b16614ac095e5d2b11ae4e06649cf)
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From fece8b3e700c30be2b6bb1239041333b3c1fc17b Mon Sep 17 00:00:00 2001
|
|
From: liuxiangdong <liuxiangdong5@huawei.com>
|
|
Date: Mon, 5 Dec 2022 07:11:28 +0800
|
|
Subject: [PATCH] vhost_net: keep acked_feature only for
|
|
NET_CLIENT_DRIVER_VHOST_USER
|
|
|
|
Keep acked_features in NetVhostUserState up-to-date by function vhost_net_save_acked_features
|
|
in function virtio_net_set_features. But nc->peer->info->type maybe NET_CLIENT_DRIVER_TAP or
|
|
NET_CLIENT_DRIVER_VHOST_VDPA besides NET_CLIENT_DRIVER_VHOST_USER.
|
|
|
|
Don't keep acked_features in other type now except NET_CLIENT_DRIVER_VHOST_USER
|
|
|
|
Fix d29a94eff(vhost-user: Fix the virtio features negotiation flaw)
|
|
|
|
Signed-off-by: liuxiangdong <liuxiangdong5@huawei.com>
|
|
---
|
|
hw/net/vhost_net.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
|
|
index a98575ffbc..bea053a742 100644
|
|
--- a/hw/net/vhost_net.c
|
|
+++ b/hw/net/vhost_net.c
|
|
@@ -143,8 +143,9 @@ uint64_t vhost_net_get_acked_features(VHostNetState *net)
|
|
|
|
void vhost_net_save_acked_features(NetClientState *nc)
|
|
{
|
|
- assert(nc->info->type == NET_CLIENT_DRIVER_VHOST_USER);
|
|
- vhost_user_save_acked_features(nc);
|
|
+ if (nc->info->type == NET_CLIENT_DRIVER_VHOST_USER) {
|
|
+ vhost_user_save_acked_features(nc);
|
|
+ }
|
|
}
|
|
|
|
static int vhost_net_get_fd(NetClientState *backend)
|
|
--
|
|
2.27.0
|
|
|