]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: multiqueue for ccw devices
authorBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Wed, 6 May 2015 14:07:40 +0000 (16:07 +0200)
committerLaine Stump <laine@laine.org>
Wed, 6 May 2015 15:42:42 +0000 (11:42 -0400)
Allow ccw devices to be used with multiqueues. ccw provides a one to
one relation of fds to queues and does not support the vectors option.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Reviewed-by: Daniel Hansel <daniel.hansel@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
src/qemu/qemu_command.c

index 68844fa973a292515d36404d4489ec7581b69338..fe4622ef7ceade805730e332cc374ee0d79a9fad 100644 (file)
@@ -5129,9 +5129,17 @@ qemuBuildNicDevStr(virDomainDefPtr def,
         }
     }
     if (usingVirtio && vhostfdSize > 1) {
-        /* As advised at http://www.linux-kvm.org/page/Multiqueue
-         * we should add vectors=2*N+2 where N is the vhostfdSize */
-        virBufferAsprintf(&buf, ",mq=on,vectors=%zu", 2 * vhostfdSize + 2);
+        if (net->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
+            /* ccw provides a one to one relation of fds to queues and
+             * does not support the vectors option
+             */
+            virBufferAddLit(&buf, ",mq=on");
+        } else {
+            /* As advised at http://www.linux-kvm.org/page/Multiqueue
+             * we should add vectors=2*N+2 where N is the vhostfdSize
+             */
+            virBufferAsprintf(&buf, ",mq=on,vectors=%zu", 2 * vhostfdSize + 2);
+        }
     }
     if (vlan == -1)
         virBufferAsprintf(&buf, ",netdev=host%s", net->info.alias);