From 614be3b8827604c730856d8c90f0854f76df9fcc Mon Sep 17 00:00:00 2001
From: ZhiPeng Lu
Date: Thu, 18 Jan 2018 00:14:06 +0800
Subject: [PATCH] vhost-user: add support reconnect for vhost-user ports
For vhost-user ports, Open vSwitch acts as the server and QEMU the client.
When OVS crashes or restarts, the QEMU process should be reconnected to
OVS.
Signed-off-by: ZhiPeng Lu
Signed-off-by: Michal Privoznik
---
docs/formatdomain.html.in | 11 +-
docs/schemas/domaincommon.rng | 26 +--
src/conf/domain_conf.c | 162 ++++++++++--------
.../net-vhostuser-multiq.args | 12 +-
.../qemuxml2argvdata/net-vhostuser-multiq.xml | 11 +-
5 files changed, 135 insertions(+), 87 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index f7f45bf838..f1fb8e59cc 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5900,7 +5900,9 @@ qemu-kvm -net nic,model=? /dev/null
</interface>
<interface type='vhostuser'>
<mac address='52:54:00:3b:83:1b'/>
- <source type='unix' path='/tmp/vhost2.sock' mode='client'/>
+ <source type='unix' path='/tmp/vhost2.sock' mode='client'>
+ <reconnect enabled='yes' timeout='10'/>
+ </source>
<model type='virtio'/>
<driver queues='5'/>
</interface>
@@ -5916,6 +5918,13 @@ qemu-kvm -net nic,model=? /dev/null
are supported.
vhost-user requires the virtio model type, thus the
<model>
element is mandatory.
+ Since 4.1.0 the element has an
+ optional child element reconnect
which
+ configures reconnect timeout if the connection is lost. It
+ has two attributes enabled
(which accepts
+ yes
and no
) and
+ timeout
which specifies the amount of seconds
+ after which hypervisor tries to reconnect.
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index e4efee2e85..ee6f83c96c 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2431,6 +2431,18 @@
+
+
+
+
+
+
+
+
+
+
+
+