]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
conf: Ignore multiqueue with one queue.
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 4 Jun 2015 09:23:28 +0000 (11:23 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 11 Jun 2015 12:17:46 +0000 (14:17 +0200)
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@redhat.com>
src/conf/domain_conf.c
tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml

index 36de8441990eff0a8b2705e0bb4ebcbacc5cc4f8..2e7961001090751fe63c3dc89c77213a3fe28181 100644 (file)
@@ -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) {
index 2cf312f0ca5328adeddaf492dc129e48936fc7e9..28f93474136e322fc1226bdfe3c9906bac0e9640 100644 (file)
       <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>
index 266cbf0a72b868e8c2d1d3cc27a76e095c16ec01..d419cc3b8e153e3fab1ed02213bb771915d9db54 100644 (file)
       <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>