From nobody Thu May 15 06:51:01 2025
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28
as permitted sender) client-ip=209.132.183.28;
envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com;
Authentication-Results: mx.zohomail.com;
spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1510537919722552.4331778814814;
Sun, 12 Nov 2017 17:51:59 -0800 (PST)
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
[10.5.11.11])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 3C3AF14F17C;
Mon, 13 Nov 2017 01:51:57 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
(colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 065CD17C2A;
Mon, 13 Nov 2017 01:51:55 +0000 (UTC)
Received: from lists01.pubmisc.prod.ext.phx2.redhat.com
(lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7CA244BB79;
Mon, 13 Nov 2017 01:51:51 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com
[10.5.11.15])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id vAD1pmdn024262 for ;
Sun, 12 Nov 2017 20:51:48 -0500
Received: by smtp.corp.redhat.com (Postfix)
id B356D6268D; Mon, 13 Nov 2017 01:51:48 +0000 (UTC)
Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com
[10.5.110.29])
by smtp.corp.redhat.com (Postfix) with ESMTPS id AABD15EDEE;
Mon, 13 Nov 2017 01:51:46 +0000 (UTC)
Received: from mxct.zte.com.cn (out1.zte.com.cn [202.103.147.172])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id BD84338164B;
Mon, 13 Nov 2017 01:51:42 +0000 (UTC)
Received: from mse01.zte.com.cn (unknown [10.30.3.20])
by Forcepoint Email with ESMTPS id 06A8EEA7862435053F7E;
Mon, 13 Nov 2017 09:36:06 +0800 (CST)
Received: from notes_smtp.zte.com.cn ([10.30.1.239])
by mse01.zte.com.cn with ESMTP id vAD1Yu2I070280;
Mon, 13 Nov 2017 09:34:56 +0800 (GMT-8)
(envelope-from lu.zhipeng@zte.com.cn)
Received: from ceshi.localdomain ([10.74.120.130])
by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6)
with ESMTP id 2017111309345783-1241408 ;
Mon, 13 Nov 2017 09:34:57 +0800
From: ZhiPeng Lu
To: libvir-list@redhat.com
Date: Mon, 13 Nov 2017 09:34:48 +0800
Message-Id: <1510536888-13104-1-git-send-email-lu.zhipeng@zte.com.cn>
X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release
8.5.3FP6|November 21, 2013) at 2017-11-13 09:34:57,
Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17,
2016) at 2017-11-13 09:34:56,
Serialize complete at 2017-11-13 09:34:56
X-MAIL: mse01.zte.com.cn vAD1Yu2I070280
X-Greylist: Delayed for 00:15:34 by milter-greylist-4.5.16 (mx1.redhat.com
[10.5.110.29]); Mon, 13 Nov 2017 01:51:43 +0000 (UTC)
X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com
[10.5.110.29]);
Mon, 13 Nov 2017 01:51:43 +0000 (UTC) for IP:'202.103.147.172'
DOMAIN:'out1.zte.com.cn' HELO:'mxct.zte.com.cn'
FROM:'lu.zhipeng@zte.com.cn' RCPT:''
X-RedHat-Spam-Score: -0.002 (RP_MATCHES_RCVD,
SPF_PASS) 202.103.147.172 out1.zte.com.cn 202.103.147.172
out1.zte.com.cn
X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-loop: libvir-list@redhat.com
Cc: Michal Privoznik , ZhiPeng Lu
Subject: [libvirt] [PATCH v4] vhost-user: add support reconnect for
vhost-user ports
X-BeenThere: libvir-list@redhat.com
X-Mailman-Version: 2.1.12
Precedence: junk
List-Id: Development discussions about the libvirt library & tools
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]);
Mon, 13 Nov 2017 01:51:58 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
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
---
v1->v2:
- modify xml format=20
v2->v3:
- fix commit message syntax
- reimplemente functions and the struct about reconnect
v3->v4:
- revert reimplemente functions and the struct about reconnect
docs/formatdomain.html.in | 7 +-
docs/schemas/domaincommon.rng | 26 ++--
src/conf/domain_conf.c | 158 ++++++++++++-----=
----
.../qemuxml2argv-net-vhostuser-multiq.args | 12 +-
.../qemuxml2argv-net-vhostuser-multiq.xml | 11 +-
5 files changed, 127 insertions(+), 87 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 92e14a9..7ea72ed 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5756,7 +5756,9 @@ qemu-kvm -net nic,model=3D? /dev/null
</interface>
<interface type=3D'vhostuser'>
<mac address=3D'52:54:00:3b:83:1b'/>
- <source type=3D'unix' path=3D'/tmp/vhost2.sock' mode=3D'client'/>
+ <source type=3D'unix' path=3D'/tmp/vhost2.sock' mode=3D'client'>
+ <reconnect enabled=3D'yes' timeout=3D'10'/>
+ </source>=20
<model type=3D'virtio'/>
<driver queues=3D'5'/>
</interface>
@@ -5772,6 +5774,9 @@ qemu-kvm -net nic,model=3D? /dev/null
are supported.
vhost-user requires the virtio model type, thus the
<model>
element is mandatory.
+ Since 3.10.0 the element has an optional
+ attribute reconnect
which configures reconnect timeout
+ (in seconds) if the connection is lost.
=20
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 9cec1a0..66b9758 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2399,6 +2399,18 @@
+
+
+
+ [
+ ]
+
+
+ [
+ ]
+
+
+
=20