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:
Michal Privoznik 2022-11-07 15:13:44 +01:00
parent 0bf7e0cf63
commit 69eeea5d92
4 changed files with 0 additions and 13 deletions

View File

@ -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,

View File

@ -1 +0,0 @@
unsupported configuration: virtio-net failover (teaming) is not supported with this QEMU binary

View File

@ -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");

View File

@ -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");