<div class="zcontentRow" style="font-size:14px;font-family:宋体,SimSun;"> <p><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>>                <empty/></span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>>              </element></span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">> >             <ref name="interface-options"/></span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> index cc5e79b..d121a9e 100644</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> --- a/src/conf/domain_conf.c</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> +++ b/src/conf/domain_conf.c</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> @@ -83,6 +83,13 @@ struct _virDomainXMLOption {</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>>      /* Private data for save image stored in snapshot XML */</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>>      virSaveCookieCallbacks saveCookie;</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>>  };</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> +static int</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> +virDomainChrSourceReconnectDefParseXML(virDomainChrSourceReconnectDefPtr def,</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> +                                       xmlNodePtr node,</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> +                                       xmlXPathContextPtr ctxt);</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> +static void</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> +virDomainChrSourceReconnectDefFormat(virBufferPtr buf,</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>> +                                     virDomainChrSourceReconnectDefPtr def);</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>Since these functions (and the struct) are no longer used just for chr</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>source, their names should be made more generic - remove the "Chr" from</span><br style="box-sizing: border-box; font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; white-space: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">>them all (maybe replace it with "Device"?)</span></p><p><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">In fact, these functions are still used to char device of  vhostuser devices. </span></p><p><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);">Changing the name may not reflect the meaning.</span></p><p><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);"><br></span></p><p><span style="font-family: Arial, 宋体, 'Microsoft Yahei', 'Lucida Grande', Verdana, Lucida, Helvetica, sans-serif; line-height: 20px; background-color: rgb(255, 255, 255);"><br></span></p><p><br></p><p><br></p><p><br></p><p><br></p><div class="zMailSign"><div><div><div><div><div><div><div><div><p style="font-family: 宋体; font-size:14px; line-height: normal; widows: 1;"><span style="font-size:14px;color:#58595B;font-family:微软雅黑;font-size:14px;"><span class="signedit"><span style="box-sizing: border-box; font-weight: 700; color: rgb(255, 192, 0); font-family: 宋体; line-height: normal; outline: 0px !important; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; outline: 0px !important; font-family: 微软雅黑; font-size: 18px;"><span style="box-sizing: border-box; font-family: 微软雅黑, 'Microsoft YaHei'; font-size: 20px; line-height: 36px; outline: 0px !important;">为了让您的VPlat虚拟机故障和docker故障得到高效的处理,请上报故障到: </span><span style="box-sizing: border-box; font-family: 微软雅黑, 'Microsoft YaHei'; font-size: 20px; line-height: 17.1420001983643px; outline: none !important;">$VPlat技术支持。</span></span></span></span></span></p><p style="font-family: 宋体; font-size:14px; line-height: normal; widows: 1;"><span style="font-size:14px;color:#58595B;font-family:微软雅黑"><span class="signedit" id="sign_name">芦志朋</span> <span style="font-family:Arial"><span class="signedit" id="sign_name_eng">luzhipeng</span></span></span></p><p style="font-size:14px; line-height: normal; widows: 1;"><span style="font-size:14px;color:#58595B;font-family:微软雅黑;font-size:14px;"><span style=""><span class="signedit"><br></span></span></span></p><p style="font-family: 宋体; font-size:14px; line-height: normal; widows: 1;"><span style="font-size:14px;color:#58595B;font-family:微软雅黑"><span class="signedit" id="sign_position">IT开发工程师</span> <span style="font-family:Arial"><span class="signedit" id="sign_position_eng">IT Development
Engineer</span></span></span><br><span style="font-size:14px;color:#58595B;font-family:微软雅黑"><span class="signedit" id="sign_dept">操作系统产品部/中心研究院/系统产品</span> <span style="font-family:Arial"> <span class="signedit" id="sign_dept_eng">OS Product Dept./Central R&D Institute/System Product</span></span></span></p><p style="font-size:14px; line-height: normal; widows: 1;"><span style="font-size:14px;color:#58595B;font-family:微软雅黑;font-size:14px;"><span style=""><span class="signedit"><br></span></span></span></p><p style="font-size:14px; line-height: normal; widows: 1;"><span style="font-size:14px;color:#58595B;font-family:微软雅黑;font-size:14px;"></span></p><table style="color: rgb(0, 0, 0); font-family: 宋体; widows: 1;"><tbody><tr class="firstRow"><td valign="top" width="100"><img id="sign-icon" src="cid:9ae3e214c17d49ed935d87c674ba3ee2" width="130" height="120"></td><td valign="top" width="500" style="word-break: break-all;"><img id="sign-logo" src="cid:24242e5637af428891c4db731e7765ad" width="115" height="38"><br><span style="color: rgb(88, 89, 91); font-family: 微软雅黑;">四川省成都市天府大道中段800号<br><span style="font-size: 10px; font-family: Arial;"><span style="color:#008FD4">E</span>: <span class="signedit" id="sign_email"><a href="mailto:lu.zhipeng@zte.com.cn">lu.zhipeng@zte.com.cn</a></span> <br><span style="color:#008FD4"><a href="http://www.zte.com.cn/" target="_blank">www.zte.com.cn</a></span></span></span></td></tr></tbody></table><span style="line-height: normal; widows: 1; font-size:14px;;color:#58595b;font-size:10px"></span></div></div></div></div></div></div></div></div></div><div><div class="zhistoryRow" style="display:block"><div class="zhistoryDes" style="width: 100%; height: 28px; line-height: 28px; background-color: #E0E5E9; color: #1388FF; text-align: center;" language-data="HistoryOrgTxt">原始邮件</div><div id="zwriteHistoryContainer"><div class="control-group zhistoryPanel"><div class="zhistoryHeader" style="padding: 8px; background-color: #F5F6F8;"><div><strong language-data="HistorySenderTxt">发件人:</strong><span class="zreadUserName"> <laine@laine.org>;</span></div><div><strong language-data="HistoryTOTxt">收件人:</strong><span class="zreadUserName" style="display: inline;"> <libvir-list@redhat.com>;</span></div><div><strong language-data="HistoryCCTxt">抄送人:</strong><span class="zreadUserName" style="display: inline;">芦志朋10108272;</span><span class="zreadUserName" style="display: inline;"> <mprivozn@redhat.com>;</span><span class="zreadUserName" style="display: inline;"> <phrdina@redhat.com>;</span></div><div><strong language-data="HistoryDateTxt">日 期 :</strong><span class="">2017年09月22日 01:45</span></div><div><strong language-data="HistorySubjectTxt">主 题 :</strong><span class="zreadTitle"><strong>Re: [libvirt] [PATCH] vhost-user: add support reconnect forvhost-user ports</strong></span></div></div><p class="zhistoryContent"><br></p><div>> Re: [libvirt] [PATCH] vhost-user: add support reconnect for vhost-user<br>ports<br><br>When sending a v2/v3/etc of a patch, use the "-v2" (or -v3, -v4, etc)<br>option to git send-email so that the subject line shows up as "[PATCH v2]".<br><br>On 09/21/2017 07:39 AM, ZhiPeng Lu wrote:<br>> For vhost-user ports, Open vSwitch acts as the server and QEMU the client.<br>> When OVS crashed or restart, QEMU shoule be reconnect to OVS.<br><br><br>"When OVS crashes or restarts, the QEMU process should be reconnected to<br>OVS"<br><br>><br>> Signed-off-by: ZhiPeng Lu <lu.zhipeng@zte.com.cn><br>> ---<br>> v1->v2:<br>>  - modify xml format<br>> ---<br><br>Looks like you added the above text to your commit log message. Instead,<br>you can just add it in below the "---" line during git send-email, with<br>the "--annotate" option.<br><br><br>> ---<br>>  docs/schemas/domaincommon.rng                      | 12 ++++++++++<br>>  src/conf/domain_conf.c                             | 26 ++++++++++++++++++++++<br>>  .../qemuxml2argv-net-vhostuser-multiq.args         |  4 ++--<br>>  .../qemuxml2argv-net-vhostuser-multiq.xml          |  8 +++++--<br>>  4 files changed, 46 insertions(+), 4 deletions(-)<br>><br>> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng<br>> index 76852ab..bf015ca 100644<br>> --- a/docs/schemas/domaincommon.rng<br>> +++ b/docs/schemas/domaincommon.rng<br>> @@ -2388,6 +2388,18 @@<br>>                    <value>client</value><br>>                  </choice><br>>                </attribute><br>> +              <optional><br>> +                <element name="reconnect"><br>> +                  <attribute name="enabled"><br>> +                    <ref name="virYesNo"/><br>> +                  </attribute><br>> +                  <optional><br>> +                    <attribute name="timeout"><br>> +                      <ref name="unsignedInt"/><br>> +                    </attribute><br>> +                  </optional><br>> +               </element><br>> +              </optional><br><br>Rather than doing a copy-paste of this from qemucdevSrcDef, it would be<br>more useful to *move* it to create a new definition for something called<br>"reconnect":<br><br>              <define name="reconnect"><br>                <element name="reconnect"><br>                  <attribute name="enabled"><br>                    <ref name="virYesNo"/><br>                  </attribute><br>                  <optional><br>                    <attribute name="timeout"><br>                      <ref name="unsignedInt"/><br>                    </attribute><br>                  </optional><br>               </element><br>             </define><br><br>then reference that where it's needed (both for interface source and qemucdevSrcDef):<br><br><br>        <optional><br>          <ref name="reconnect"/><br>        </optional><br><br>>                <empty/><br>>              </element><br>>              <ref name="interface-options"/><br>> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c<br>> index cc5e79b..d121a9e 100644<br>> --- a/src/conf/domain_conf.c<br>> +++ b/src/conf/domain_conf.c<br>> @@ -83,6 +83,13 @@ struct _virDomainXMLOption {<br>>      /* Private data for save image stored in snapshot XML */<br>>      virSaveCookieCallbacks saveCookie;<br>>  };<br>> +static int<br>> +virDomainChrSourceReconnectDefParseXML(virDomainChrSourceReconnectDefPtr def,<br>> +                                       xmlNodePtr node,<br>> +                                       xmlXPathContextPtr ctxt);<br>> +static void<br>> +virDomainChrSourceReconnectDefFormat(virBufferPtr buf,<br>> +                                     virDomainChrSourceReconnectDefPtr def);<br><br>Since these functions (and the struct) are no longer used just for chr<br>source, their names should be made more generic - remove the "Chr" from<br>them all (maybe replace it with "Device"?)<br><br>>  <br>>  #define VIR_DOMAIN_DEF_FORMAT_COMMON_FLAGS             \<br>>      (VIR_DOMAIN_DEF_FORMAT_SECURE |                    \<br>> @@ -10245,6 +10252,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,<br>>      virNWFilterHashTablePtr filterparams = NULL;<br>>      virDomainActualNetDefPtr actual = NULL;<br>>      xmlNodePtr oldnode = ctxt->node;<br>> +    virDomainChrSourceReconnectDef reconnect = {0};<br>>      int rv, val;<br>>  <br>>      if (VIR_ALLOC(def) < 0)<br>> @@ -10331,6 +10339,8 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,<br>>                  vhostuser_type = virXMLPropString(cur, "type");<br>>                  vhostuser_path = virXMLPropString(cur, "path");<br>>                  vhostuser_mode = virXMLPropString(cur, "mode");<br>> +                if (virDomainChrSourceReconnectDefParseXML(&reconnect, cur, ctxt) < 0)<br>> +                    goto error;<br>>              } else if (!def->virtPortProfile<br>>                         && virXMLNodeNameEqual(cur, "virtualport")) {<br>>                  if (def->type == VIR_DOMAIN_NET_TYPE_NETWORK) {<br>> @@ -10552,8 +10562,17 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,<br>>  <br>>          if (STREQ(vhostuser_mode, "server")) {<br>>              def->data.vhostuser->data.nix.listen = true;<br>> +            if (reconnect.enabled != VIR_TRISTATE_BOOL_ABSENT) {<br>> +                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",<br>> +                               _("'reconnect' attribute  unsupported "<br>> +                                 "'server' mode for <interface type='vhostuser'>"));<br>> +                goto error;<br>> +           }<br><br>Ugh. Having the reconnect info stored all the way down in a<br>device-type-specific part of the object makes it *really* difficult to<br>do proper validation (e.g. if someone adds a <reconnect> element to the<br><source> of a <hostdev>, it will be ignored, then silently disappear,<br>rather than being reported as an error. Unfortunately we don't have a<br>generic "source" sub-object that is a part of all device objects<br>(similar to the virDomainDeviceInfo that is a part of every device no<br>matter the type), so there isn't a real clear place to put it. It would<br>be nice to be able to properly log an error when <reconnect> is used in<br>an inappropriate place, though (admittedly, there are infinite things<br>that might be added to the XML and be silently ignored, so it may be<br>appropriate to "punt" in this case too.)<br><br><br>>          } else if (STREQ(vhostuser_mode, "client")) {<br>>              def->data.vhostuser->data.nix.listen = false;<br>> +            def->data.vhostuser->data.nix.reconnect.enabled = reconnect.enabled;<br>> +            def->data.vhostuser->data.nix.reconnect.timeout = reconnect.timeout;<br>> +            reconnect.enabled = VIR_TRISTATE_BOOL_ABSENT;<br>>          } else {<br>>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",<br>>                             _("Wrong <source> 'mode' attribute "<br>> @@ -22984,6 +23003,13 @@ virDomainNetDefFormat(virBufferPtr buf,<br>>                                    def->data.vhostuser->data.nix.listen ?<br>>                                    "server"  : "client");<br>>                  sourceLines++;<br>> +                if (def->data.vhostuser->data.nix.reconnect.enabled != VIR_TRISTATE_BOOL_ABSENT) {<br>> +                    virBufferAddLit(buf, ">\n");<br>> +                    sourceLines++;<br>> +                    virBufferAdjustIndent(buf, 2);<br>> +                    virDomainChrSourceReconnectDefFormat(buf, &def->data.vhostuser->data.nix.reconnect);<br>> +                    virBufferAdjustIndent(buf, -2);<br>> +                }<br>>              }<br>>              break;<br>>  <br>> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-vhostuser-multiq.args b/tests/qemuxml2argvdata/qemuxml2argv-net-vhostuser-multiq.args<br>> index b69ebd8..0b08f44 100644<br>> --- a/tests/qemuxml2argvdata/qemuxml2argv-net-vhostuser-multiq.args<br>> +++ b/tests/qemuxml2argvdata/qemuxml2argv-net-vhostuser-multiq.args<br>> @@ -25,14 +25,14 @@ server,nowait \<br>>  -netdev vhost-user,chardev=charnet0,id=hostnet0 \<br>>  -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:ee:96:6b,bus=pci.0,\<br>>  addr=0x3 \<br>> --chardev socket,id=charnet1,path=/tmp/vhost1.sock \<br>> +-chardev socket,id=charnet1,path=/tmp/vhost1.sock,reconnect=10 \<br>>  -netdev vhost-user,chardev=charnet1,id=hostnet1 \<br>>  -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:ee:96:6c,bus=pci.0,\<br>>  addr=0x4 \<br>>  -netdev socket,listen=:2015,id=hostnet2 \<br>>  -device rtl8139,netdev=hostnet2,id=net2,mac=52:54:00:95:db:c0,bus=pci.0,\<br>>  addr=0x5 \<br>> --chardev socket,id=charnet3,path=/tmp/vhost2.sock \<br>> +-chardev socket,id=charnet3,path=/tmp/vhost2.sock,reconnect=0 \<br>>  -netdev vhost-user,chardev=charnet3,queues=4,id=hostnet3 \<br>>  -device virtio-net-pci,mq=on,vectors=10,netdev=hostnet3,id=net3,\<br>>  mac=52:54:00:ee:96:6d,bus=pci.0,addr=0x6<br>> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-vhostuser-multiq.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-vhostuser-multiq.xml<br>> index d5c42fe..2fadb1c 100644<br>> --- a/tests/qemuxml2argvdata/qemuxml2argv-net-vhostuser-multiq.xml<br>> +++ b/tests/qemuxml2argvdata/qemuxml2argv-net-vhostuser-multiq.xml<br>> @@ -30,7 +30,9 @@<br>>      </interface><br>>      <interface type='vhostuser'><br>>        <mac address='52:54:00:ee:96:6c'/><br>> -      <source type='unix' path='/tmp/vhost1.sock' mode='client'/><br>> +      <source type='unix' path='/tmp/vhost1.sock' mode='client'><br>> +        <reconnect enabled='yes' timeout='10'/><br>> +      </source><br>>        <model type='virtio'/><br>>      </interface><br>>      <interface type='server'><br>> @@ -40,7 +42,9 @@<br>>      </interface><br>>      <interface type='vhostuser'><br>>        <mac address='52:54:00:ee:96:6d'/><br>> -      <source type='unix' path='/tmp/vhost2.sock' mode='client'/><br>> +      <source type='unix' path='/tmp/vhost2.sock' mode='client'><br>> +        <reconnect enabled='no'/><br>> +      </source><br>>        <model type='virtio'/><br>>        <driver queues='4'/><br>>      </interface><br><br></div><p><br></p></div></div></div></div><p><br></p> </div>