]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Assume QEMU_CAPS_VIRTIO_NET_FAILOVER
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Nov 2022 14:13:44 +0000 (15:13 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 8 Nov 2022 11:10:50 +0000 (12:10 +0100)
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>
src/qemu/qemu_validate.c
tests/qemuxml2argvdata/net-virtio-teaming.err [deleted file]
tests/qemuxml2argvtest.c
tests/qemuxml2xmltest.c

index c01bc6f8b57e18fc85aee69e3fc34e017dff5064..243ec29c71c88377d13f9df4e2961a842de16e53 100644 (file)
@@ -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 (file)
index e49a1da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unsupported configuration: virtio-net failover (teaming) is not supported with this QEMU binary
index 029e60947fa630491ffd01670e910736c94d0974..3b25c99639aa233cc96299cce31ea05957ae0227 100644 (file)
@@ -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");
index 3a117ff1379ea5d5b38a44f2cb80bbdf34b02c08..1b74a81f26b4ff31f1dc7244bad740dd4926fe36 100644 (file)
@@ -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");