mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: passt: Use 'reconnect-ms' instead of 'reconnect' with new qemus
The 'reconnect' field of 'stream' network backend type is about to be deprecated so libvirt will need to start using 'reconnect-ms'. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9e273db203
commit
e4d058866e
@ -104,12 +104,14 @@ qemuPasstAddNetProps(virDomainObj *vm,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* a narrow range of QEMU releases support -netdev stream, but
|
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NETDEV_STREAM_RECONNECT)) {
|
||||||
* don't support its "reconnect" option
|
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS)) {
|
||||||
*/
|
if (virJSONValueObjectAdd(netprops, "u:reconnect-ms", 5000, NULL) < 0)
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NETDEV_STREAM_RECONNECT) &&
|
return -1;
|
||||||
virJSONValueObjectAdd(netprops, "u:reconnect", 5, NULL) < 0) {
|
} else {
|
||||||
return -1;
|
if (virJSONValueObjectAdd(netprops, "u:reconnect", 5, NULL) < 0)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user