]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuBuildNicDevStr: Adapt to new advisory on multiqueue
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 4 Mar 2014 09:33:46 +0000 (10:33 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 4 Mar 2014 09:43:05 +0000 (10:43 +0100)
As I did previously in 4f588a1b46, libvirt needs to set virtio vectors.
Previously, we were advised to use vectors=N, where

N = 2 * (number of queues) + 1

However, just recently this advisory has changed on the Multiquue wiki
page [1] to:

N = 2 * (number of queues) + 2

1: http://www.linux-kvm.org/page/Multiqueue#Enable_MQ_feature

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_command.c

index ff0b2d5ec020ad7dac1685652ea79813fed09fac..18d0a64cb10f03430e7a7d5268997e16ce5a15af 100644 (file)
@@ -5036,8 +5036,8 @@ qemuBuildNicDevStr(virDomainDefPtr def,
     }
     if (usingVirtio && vhostfdSize > 1) {
         /* As advised at http://www.linux-kvm.org/page/Multiqueue
-         * we should add vectors=2*N+1 where N is the vhostfdSize */
-        virBufferAsprintf(&buf, ",mq=on,vectors=%d", 2 * vhostfdSize + 1);
+         * we should add vectors=2*N+2 where N is the vhostfdSize */
+        virBufferAsprintf(&buf, ",mq=on,vectors=%d", 2 * vhostfdSize + 2);
     }
     if (vlan == -1)
         virBufferAsprintf(&buf, ",netdev=host%s", net->info.alias);