[PATCH 1/4] conf: Ignore multiqueue with one queue.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Multi != One.  And indeed, libvirt behaves the same way for queues='1'
as without such setting.  Let's make it clear in the XML.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/conf/domain_conf.c                                          | 3 ++-
 tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml     | 6 ++++++
 tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml | 6 ++++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 36de8441990e..2e7961001090 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8626,7 +8626,8 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
                                queues);
                 goto error;
             }
-            def->driver.virtio.queues = q;
+            if (q > 1)
+                def->driver.virtio.queues = q;
         }
         if ((str = virXPathString("string(./driver/host/@csum)", ctxt))) {
             if ((val = virTristateSwitchTypeFromString(str)) <= 0) {
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml b/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml
index 2cf312f0ca53..28f93474136e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml
@@ -28,6 +28,12 @@
       <driver name='vhost' queues='5'/>
       <backend tap='/dev/null' vhost='/dev/zero'/>
     </interface>
+    <interface type='user'>
+      <mac address='52:54:00:e5:48:59'/>
+      <model type='virtio'/>
+      <driver name='vhost' queues='1'/>
+      <backend tap='/dev/null' vhost='/dev/zero'/>
+    </interface>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml
index 266cbf0a72b8..d419cc3b8e15 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml
@@ -27,6 +27,12 @@
       <model type='definitely-not-virtio'/>
       <backend tap='/dev/null'/>
     </interface>
+    <interface type='user'>
+      <mac address='52:54:00:e5:48:59'/>
+      <model type='virtio'/>
+      <driver name='vhost'/>
+      <backend tap='/dev/null' vhost='/dev/zero'/>
+    </interface>
     <serial type='pty'>
       <target port='0'/>
     </serial>
-- 
2.4.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]