[PATCH 28/48] qemu: Assume QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE

Michal Privoznik mprivozn at redhat.com
Tue Nov 8 08:29:30 UTC 2022


Introduced in QEMU's commit of v2.10.0-rc0~95^2~20 the
.tx_queue_size 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 at redhat.com>
---
 src/qemu/qemu_validate.c | 6 ------
 tests/qemuxml2argvtest.c | 3 +--
 tests/qemuxml2xmltest.c  | 3 +--
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 74631378c6..88f2aa8c49 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -1874,12 +1874,6 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net,
                                _("tx_queue_size has to be a power of two"));
                 return -1;
             }
-            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE)) {
-                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                               _("virtio tx_queue_size option is not supported "
-                                 "with this QEMU binary"));
-                return -1;
-            }
         }
 
         if (net->driver.virtio.rss &&
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 98ba6633f8..029e60947f 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1465,8 +1465,7 @@ mymain(void)
     DO_TEST_NOCAPS("net-virtio-disable-offloads");
     DO_TEST_NOCAPS("net-virtio-netdev");
     DO_TEST_CAPS_ARCH_LATEST("net-virtio-ccw", "s390x");
-    DO_TEST("net-virtio-rxtxqueuesize",
-            QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE);
+    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,
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 22397f209f..e8261b7e8c 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -467,8 +467,7 @@ mymain(void)
     DO_TEST_NOCAPS("net-eth-hostip");
     DO_TEST_NOCAPS("net-eth-unmanaged-tap");
     DO_TEST_NOCAPS("net-virtio-network-portgroup");
-    DO_TEST("net-virtio-rxtxqueuesize",
-            QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE);
+    DO_TEST_NOCAPS("net-virtio-rxtxqueuesize");
     DO_TEST("net-virtio-teaming",
             QEMU_CAPS_VIRTIO_NET_FAILOVER,
             QEMU_CAPS_DEVICE_VFIO_PCI);
-- 
2.37.4



More information about the libvir-list mailing list