</interface>
<interface type='vhostuser'>
<mac address='52:54:00:3b:83:1b'/>
- <source type='unix' path='/tmp/vhost2.sock' mode='client' reconnect='10'/>
+ <source type='unix' path='/tmp/vhost2.sock' mode='client'/>
<model type='virtio'/>
<driver queues='5'/>
</interface>
are supported.
vhost-user requires the virtio model type, thus the
<code><model></code> element is mandatory.
- <span class="since">Since 3.7.0</span> the element has an optional
- attribute <code>reconnect</code> which configures reconnect timeout
- (in seconds) if the connection is lost.
</p>
<h5><a id="elementNwfilter">Traffic filtering with NWFilter</a></h5>
char *vhostuser_mode = NULL;
char *vhostuser_path = NULL;
char *vhostuser_type = NULL;
- char *vhostuser_reconnect = NULL;
char *trustGuestRxFilters = NULL;
char *vhost_path = NULL;
virNWFilterHashTablePtr filterparams = NULL;
goto error;
}
} else if (!vhostuser_path && !vhostuser_mode && !vhostuser_type
- && !vhostuser_reconnect && def->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER
- && virXMLNodeNameEqual(cur, "source")) {
+ && def->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER &&
+ virXMLNodeNameEqual(cur, "source")) {
vhostuser_type = virXMLPropString(cur, "type");
vhostuser_path = virXMLPropString(cur, "path");
vhostuser_mode = virXMLPropString(cur, "mode");
- vhostuser_reconnect = virXMLPropString(cur, "reconnect");
} else if (!def->virtPortProfile
&& virXMLNodeNameEqual(cur, "virtualport")) {
if (def->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
if (STREQ(vhostuser_mode, "server")) {
def->data.vhostuser->data.nix.listen = true;
- if (vhostuser_reconnect) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("'reconnect' attribute unsupported "
- "'server' mode for <interface type='vhostuser'>"));
- goto error;
- }
} else if (STREQ(vhostuser_mode, "client")) {
def->data.vhostuser->data.nix.listen = false;
- if (vhostuser_reconnect) {
- def->data.vhostuser->data.nix.reconnect.enabled = true;
- if (virStrToLong_ui(vhostuser_reconnect, NULL, 10,
- &def->data.vhostuser->data.nix.reconnect.timeout) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("invalid vhostuser reconnect value %s"),
- vhostuser_reconnect);
- goto error;
- }
- }
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Wrong <source> 'mode' attribute "
VIR_FREE(portgroup);
VIR_FREE(address);
VIR_FREE(port);
- VIR_FREE(vhostuser_reconnect);
VIR_FREE(vhostuser_type);
VIR_FREE(vhostuser_path);
VIR_FREE(vhostuser_mode);
virBufferAsprintf(buf, " mode='%s'",
def->data.vhostuser->data.nix.listen ?
"server" : "client");
- if (def->data.vhostuser->data.nix.reconnect.enabled == true) {
- virBufferAsprintf(buf, " reconnect='%u'",
- def->data.vhostuser->data.nix.reconnect.timeout);
- }
-
sourceLines++;
}
break;
-netdev socket,listen=:2015,id=hostnet2 \
-device rtl8139,netdev=hostnet2,id=net2,mac=52:54:00:95:db:c0,bus=pci.0,\
addr=0x5 \
--chardev socket,id=charnet3,path=/tmp/vhost2.sock,reconnect=10 \
+-chardev socket,id=charnet3,path=/tmp/vhost2.sock \
-netdev vhost-user,chardev=charnet3,queues=4,id=hostnet3 \
-device virtio-net-pci,mq=on,vectors=10,netdev=hostnet3,id=net3,\
mac=52:54:00:ee:96:6d,bus=pci.0,addr=0x6