From a463215b087c41d7ca94e51aa347cde523831873 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 6 Jun 2016 18:45:05 +0200 Subject: vhost-net: save & restore vhost-user acked features The initial vhost-user connection sets the features to be negotiated with the driver. Renegotiation isn't possible without device reset. To handle reconnection of vhost-user backend, ensure the same set of features are provided, and reuse already acked features. Signed-off-by: Marc-André Lureau Tested-by: Yuanhan Liu Reviewed-by: Yuanhan Liu Reviewed-by: Victor Kaplansky Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/net/vhost-user.h | 1 + include/net/vhost_net.h | 3 +++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/net/vhost-user.h b/include/net/vhost-user.h index 85109f63aa..efae35d57e 100644 --- a/include/net/vhost-user.h +++ b/include/net/vhost-user.h @@ -13,5 +13,6 @@ struct vhost_net; struct vhost_net *vhost_user_get_vhost_net(NetClientState *nc); +uint64_t vhost_user_get_acked_features(NetClientState *nc); #endif /* VHOST_USER_H_ */ diff --git a/include/net/vhost_net.h b/include/net/vhost_net.h index 3389b410d8..0bd48770d8 100644 --- a/include/net/vhost_net.h +++ b/include/net/vhost_net.h @@ -31,4 +31,7 @@ int vhost_net_notify_migration_done(VHostNetState *net, char* mac_addr); VHostNetState *get_vhost_net(NetClientState *nc); int vhost_set_vring_enable(NetClientState * nc, int enable); + +uint64_t vhost_net_get_acked_features(VHostNetState *net); + #endif -- cgit v1.2.3-55-g7522