mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-28 22:32:19 +00:00
qemu: do all vhostuser attribute validation in qemu driver
Since vhostuser is only used/supported by the QEMU driver, and all the rest of the vhostuser-specific validation is done in QEMU's validation, lets move the final check (to see if they've tried to enable auto-reconnect when this interface is on the server side of the vhostuser socket) to the QEMU validate. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c4746418d7
commit
56f4cc167a
@ -2185,15 +2185,6 @@ virDomainNetDefValidate(const virDomainNetDef *net)
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (net->type) {
|
switch (net->type) {
|
||||||
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
|
|
||||||
if (net->data.vhostuser->data.nix.listen &&
|
|
||||||
net->data.vhostuser->data.nix.reconnect.enabled == VIR_TRISTATE_BOOL_YES) {
|
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
||||||
_("'reconnect' attribute unsupported 'server' mode for <interface type='vhostuser'>"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case VIR_DOMAIN_NET_TYPE_USER:
|
case VIR_DOMAIN_NET_TYPE_USER:
|
||||||
if (net->backend.type == VIR_DOMAIN_NET_BACKEND_PASST) {
|
if (net->backend.type == VIR_DOMAIN_NET_BACKEND_PASST) {
|
||||||
size_t p;
|
size_t p;
|
||||||
@ -2217,6 +2208,7 @@ virDomainNetDefValidate(const virDomainNetDef *net)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
|
||||||
case VIR_DOMAIN_NET_TYPE_NETWORK:
|
case VIR_DOMAIN_NET_TYPE_NETWORK:
|
||||||
case VIR_DOMAIN_NET_TYPE_VDPA:
|
case VIR_DOMAIN_NET_TYPE_VDPA:
|
||||||
case VIR_DOMAIN_NET_TYPE_BRIDGE:
|
case VIR_DOMAIN_NET_TYPE_BRIDGE:
|
||||||
|
@ -1825,6 +1825,14 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (net->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER &&
|
||||||
|
net->data.vhostuser->data.nix.listen &&
|
||||||
|
net->data.vhostuser->data.nix.reconnect.enabled == VIR_TRISTATE_BOOL_YES) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("'reconnect' attribute is not supported when source mode='server' for <interface type='vhostuser'>"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!virDomainNetIsVirtioModel(net)) {
|
if (!virDomainNetIsVirtioModel(net)) {
|
||||||
if (net->type == VIR_DOMAIN_NET_TYPE_VDPA ||
|
if (net->type == VIR_DOMAIN_NET_TYPE_VDPA ||
|
||||||
net->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER) {
|
net->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user