mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemu: Assume QEMU_CAPS_VIRTIO_NET_FAILOVER
Introduced in QEMU's commit of v4.2.0-rc0~23^2~4 the .failover attribute of virtio-net device is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
0bf7e0cf63
commit
69eeea5d92
@ -1900,12 +1900,6 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (net->teaming) {
|
if (net->teaming) {
|
||||||
if (net->teaming->type != VIR_DOMAIN_NET_TEAMING_TYPE_NONE &&
|
|
||||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_FAILOVER)) {
|
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
||||||
_("virtio-net failover (teaming) is not supported with this QEMU binary"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (net->teaming->type == VIR_DOMAIN_NET_TEAMING_TYPE_PERSISTENT
|
if (net->teaming->type == VIR_DOMAIN_NET_TEAMING_TYPE_PERSISTENT
|
||||||
&& !virDomainNetIsVirtioModel(net)) {
|
&& !virDomainNetIsVirtioModel(net)) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
@ -1 +0,0 @@
|
|||||||
unsupported configuration: virtio-net failover (teaming) is not supported with this QEMU binary
|
|
@ -1468,11 +1468,8 @@ mymain(void)
|
|||||||
DO_TEST_NOCAPS("net-virtio-rxtxqueuesize");
|
DO_TEST_NOCAPS("net-virtio-rxtxqueuesize");
|
||||||
DO_TEST_PARSE_ERROR_NOCAPS("net-virtio-rxqueuesize-invalid-size");
|
DO_TEST_PARSE_ERROR_NOCAPS("net-virtio-rxqueuesize-invalid-size");
|
||||||
DO_TEST("net-virtio-teaming",
|
DO_TEST("net-virtio-teaming",
|
||||||
QEMU_CAPS_VIRTIO_NET_FAILOVER,
|
|
||||||
QEMU_CAPS_DEVICE_VFIO_PCI);
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
||||||
DO_TEST_PARSE_ERROR_NOCAPS("net-virtio-teaming");
|
|
||||||
DO_TEST("net-virtio-teaming-hostdev",
|
DO_TEST("net-virtio-teaming-hostdev",
|
||||||
QEMU_CAPS_VIRTIO_NET_FAILOVER,
|
|
||||||
QEMU_CAPS_DEVICE_VFIO_PCI);
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
||||||
DO_TEST_NOCAPS("net-eth");
|
DO_TEST_NOCAPS("net-eth");
|
||||||
DO_TEST_NOCAPS("net-eth-ifname");
|
DO_TEST_NOCAPS("net-eth-ifname");
|
||||||
|
@ -469,13 +469,10 @@ mymain(void)
|
|||||||
DO_TEST_NOCAPS("net-virtio-network-portgroup");
|
DO_TEST_NOCAPS("net-virtio-network-portgroup");
|
||||||
DO_TEST_NOCAPS("net-virtio-rxtxqueuesize");
|
DO_TEST_NOCAPS("net-virtio-rxtxqueuesize");
|
||||||
DO_TEST("net-virtio-teaming",
|
DO_TEST("net-virtio-teaming",
|
||||||
QEMU_CAPS_VIRTIO_NET_FAILOVER,
|
|
||||||
QEMU_CAPS_DEVICE_VFIO_PCI);
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
||||||
DO_TEST("net-virtio-teaming-network",
|
DO_TEST("net-virtio-teaming-network",
|
||||||
QEMU_CAPS_VIRTIO_NET_FAILOVER,
|
|
||||||
QEMU_CAPS_DEVICE_VFIO_PCI);
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
||||||
DO_TEST("net-virtio-teaming-hostdev",
|
DO_TEST("net-virtio-teaming-hostdev",
|
||||||
QEMU_CAPS_VIRTIO_NET_FAILOVER,
|
|
||||||
QEMU_CAPS_DEVICE_VFIO_PCI);
|
QEMU_CAPS_DEVICE_VFIO_PCI);
|
||||||
DO_TEST_CAPS_LATEST("net-isolated-port");
|
DO_TEST_CAPS_LATEST("net-isolated-port");
|
||||||
DO_TEST_NOCAPS("net-hostdev");
|
DO_TEST_NOCAPS("net-hostdev");
|
||||||
|
Loading…
Reference in New Issue
Block a user