[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2] virtio-net: calculating proper msix vectors on init
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH V2] virtio-net: calculating proper msix vectors on init |
Date: |
Tue, 9 Mar 2021 09:46:59 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 3/9/21 5:23 AM, Jason Wang wrote:
> Currently, the default msix vectors for virtio-net-pci is 3 which is
> obvious not suitable for multiqueue guest, so we depends on the user
> or management tools to pass a correct vectors parameter. In fact, we
> can simplifying this by calculating the number of vectors on realize.
>
> Consider we have N queues, the number of vectors needed is 2*N + 2
> (#queue pairs + plus one config interrupt and control vq). We didn't
> check whether or not host support control vq because it was added
> unconditionally by qemu to avoid breaking legacy guests such as Minix.
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> Changes since v1:
> - Fix typo in the commit log
> - Explain the magic number during vectors calculation
> ---
> hw/core/machine.c | 1 +
> hw/virtio/virtio-net-pci.c | 10 +++++++++-
> 2 files changed, 10 insertions(+), 1 deletion(-)
(the patch had Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>