From 69eeea5d9256f6d92024768fde73c65c643c3073 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Mon, 7 Nov 2022 15:13:44 +0100 Subject: [PATCH] qemu: Assume QEMU_CAPS_VIRTIO_NET_FAILOVER MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Peter Krempa Reviewed-by: Ján Tomko --- src/qemu/qemu_validate.c | 6 ------ tests/qemuxml2argvdata/net-virtio-teaming.err | 1 - tests/qemuxml2argvtest.c | 3 --- tests/qemuxml2xmltest.c | 3 --- 4 files changed, 13 deletions(-) delete mode 100644 tests/qemuxml2argvdata/net-virtio-teaming.err diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index c01bc6f8b5..243ec29c71 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1900,12 +1900,6 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net, } 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 && !virDomainNetIsVirtioModel(net)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, diff --git a/tests/qemuxml2argvdata/net-virtio-teaming.err b/tests/qemuxml2argvdata/net-virtio-teaming.err deleted file mode 100644 index e49a1daa88..0000000000 --- a/tests/qemuxml2argvdata/net-virtio-teaming.err +++ /dev/null @@ -1 +0,0 @@ -unsupported configuration: virtio-net failover (teaming) is not supported with this QEMU binary diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 029e60947f..3b25c99639 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1468,11 +1468,8 @@ mymain(void) DO_TEST_NOCAPS("net-virtio-rxtxqueuesize"); DO_TEST_PARSE_ERROR_NOCAPS("net-virtio-rxqueuesize-invalid-size"); DO_TEST("net-virtio-teaming", - QEMU_CAPS_VIRTIO_NET_FAILOVER, QEMU_CAPS_DEVICE_VFIO_PCI); - DO_TEST_PARSE_ERROR_NOCAPS("net-virtio-teaming"); DO_TEST("net-virtio-teaming-hostdev", - QEMU_CAPS_VIRTIO_NET_FAILOVER, QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST_NOCAPS("net-eth"); DO_TEST_NOCAPS("net-eth-ifname"); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 3a117ff137..1b74a81f26 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -469,13 +469,10 @@ mymain(void) DO_TEST_NOCAPS("net-virtio-network-portgroup"); DO_TEST_NOCAPS("net-virtio-rxtxqueuesize"); DO_TEST("net-virtio-teaming", - QEMU_CAPS_VIRTIO_NET_FAILOVER, QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST("net-virtio-teaming-network", - QEMU_CAPS_VIRTIO_NET_FAILOVER, QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST("net-virtio-teaming-hostdev", - QEMU_CAPS_VIRTIO_NET_FAILOVER, QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST_CAPS_LATEST("net-isolated-port"); DO_TEST_NOCAPS("net-hostdev"); -- 2.47.2