qemu-devel
[Top][All Lists]
Advanced

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

Re: Inconsistent virtio-net-pci MSI vector count


From: Jason Wang
Subject: Re: Inconsistent virtio-net-pci MSI vector count
Date: Wed, 3 Mar 2021 21:08:27 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.0


On 2021/3/3 6:53 下午, Stefan Hajnoczi wrote:
Hi Jason,
I stumbled across something strange with virtio-net multi-queue today.
It doesn't seem to be a bug in practice, just an inconsistency. Here are
the details in case you think something needs to be changed:

libvirt uses the vectors = 2 * N + 2 formula from
https://www.linux-kvm.org/page/Multiqueue to calculate the number of PCI
MSI vectors, where N is the number of rx/tx queue pairs.

QEMU's virtio-net-pci device has 3 MSI vectors by default. This is
inconsistent with the formula that libvirt uses (should be 4 instead of
3).


Yes.



Luckily, the Linux virtio_net.ko driver does not configure a callback
function for the control virtqueue. Therefore it can still use MSI with
only 3 vectors (config, rx, tx) instead of 4 (config, rx, tx, ctrl).

But other driver implementations might need the ctrl vq vector and would
not have enough MSI vectors.

Perhaps new QEMU machine types should set vectors to 4 by default?


Or it's time to accept this:

https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg01330.html

Thanks



Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]