[libvirt] [Question] vhost-user hotplug: multiqueue hotplug seems doesn't pass mq and vectors

Gaohaifeng (A) gaohaifeng.gao at huawei.com
Wed Nov 30 07:41:14 UTC 2016


Hi ALL:
Recently I review the vhost-user hotplug codes, when attach a vhost-user nic with multiqueue, it seems that it doesn't pass mq=on and vectors num to qemu.
Is there any special consideration or just a small mistake? Parts of codes:

qemuDomainAttachNetDevice(vhostfdSize is 0 when type is vhost-user)
qemuBuildNicDevStr:
             if (usingVirtio && vhostfdSize > 1) {
        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);
        }
}

Thanks.
Haifeng Gao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161130/3715f77f/attachment-0001.htm>


More information about the libvir-list mailing list