From nobody Wed May 14 23:54:26 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 1516176843679545.5411866784533;
Wed, 17 Jan 2018 00:14:03 -0800 (PST)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com
[10.5.11.15])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 6AFD081DE5;
Wed, 17 Jan 2018 08:14:01 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
(colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 787B55D75C;
Wed, 17 Jan 2018 08:14:00 +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 297D818033D9;
Wed, 17 Jan 2018 08:13:59 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
[10.5.11.11])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id w0H8Dvpv009542 for ;
Wed, 17 Jan 2018 03:13:58 -0500
Received: by smtp.corp.redhat.com (Postfix)
id E8B2F6EE75; Wed, 17 Jan 2018 08:13:57 +0000 (UTC)
Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com
[10.5.110.39])
by smtp.corp.redhat.com (Postfix) with ESMTPS id E26566EE6F;
Wed, 17 Jan 2018 08:13:55 +0000 (UTC)
Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.217.80.70])
(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 B55BD5D5E9;
Wed, 17 Jan 2018 08:13:51 +0000 (UTC)
Received: from mse01.zte.com.cn (unknown [10.30.3.20])
by Forcepoint Email with ESMTPS id E44096EE0824A0E3DF6E;
Wed, 17 Jan 2018 16:13:49 +0800 (CST)
Received: from notes_smtp.zte.com.cn ([10.30.1.239])
by mse01.zte.com.cn with ESMTP id w0H8Dcmh074368;
Wed, 17 Jan 2018 16:13:38 +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 2018011716134412-1829369 ;
Wed, 17 Jan 2018 16:13:44 +0800
From: ZhiPeng Lu
To: libvir-list@redhat.com
Date: Thu, 18 Jan 2018 00:14:06 +0800
Message-Id: <1516205646-30846-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 2018-01-17 16:13:44,
Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17,
2016) at 2018-01-17 16:13:30,
Serialize complete at 2018-01-17 16:13:30
X-MAIL: mse01.zte.com.cn w0H8Dcmh074368
X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207
matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com
[10.5.110.39]); Wed, 17 Jan 2018 08:13:52 +0000 (UTC)
X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com
[10.5.110.39]);
Wed, 17 Jan 2018 08:13:52 +0000 (UTC) for IP:'63.217.80.70'
DOMAIN:'mxhk.zte.com.cn' HELO:'mxhk.zte.com.cn'
FROM:'lu.zhipeng@zte.com.cn' RCPT:''
X-RedHat-Spam-Score: -2.31 (DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_MED,
SPF_PASS,
T_RP_MATCHES_RCVD) 63.217.80.70 mxhk.zte.com.cn
63.217.80.70 mxhk.zte.com.cn
X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-loop: libvir-list@redhat.com
Cc: Michal Privoznik , ZhiPeng Lu
Subject: [libvirt] [PATCHv4 RESEND] 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.15
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]);
Wed, 17 Jan 2018 08:14:02 +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
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 +++++++++++++------=
----
tests/qemuxml2argvdata/net-vhostuser-multiq.args | 12 +-
tests/qemuxml2argvdata/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 d272cc1..f0f9f4b 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5832,7 +5832,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>
@@ -5848,6 +5850,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 f22c932..9258c7d 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2399,6 +2399,18 @@
+
+
+
+ [
+ ]
+
+
+ [
+ ]
+
+
+
=20