[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] libqos: Account for the ctrl queue in virtio-ne
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH] libqos: Account for the ctrl queue in virtio-net |
Date: |
Tue, 13 Aug 2019 10:47:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 8/5/19 5:24 AM, Oleinik, Alexander wrote:
> The number of queues is 2n+1, where n == 1 when multiqueue is disabled
>
> Signed-off-by: Alexander Oleinik <address@hidden>
> ---
>
> I split this commit out of the fuzz patch-series.
>
> tests/libqos/virtio-net.c | 1 +
> tests/libqos/virtio-net.h | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/libqos/virtio-net.c b/tests/libqos/virtio-net.c
> index 66405b646e..b8b5bc5dfc 100644
> --- a/tests/libqos/virtio-net.c
> +++ b/tests/libqos/virtio-net.c
> @@ -53,6 +53,7 @@ static void virtio_net_setup(QVirtioNet *interface)
> } else {
> interface->n_queues = 2;
> }
> + inteface->n_queues++; /* Account for the ctrl queue */
>
> interface->queues = g_new(QVirtQueue *, interface->n_queues);
> for (i = 0; i < interface->n_queues; i++) {
> diff --git a/tests/libqos/virtio-net.h b/tests/libqos/virtio-net.h
> index a5697d7326..855c67d00f 100644
> --- a/tests/libqos/virtio-net.h
> +++ b/tests/libqos/virtio-net.h
> @@ -29,7 +29,7 @@ typedef struct QVirtioNetDevice QVirtioNetDevice;
>
> struct QVirtioNet {
> QVirtioDevice *vdev;
> - int n_queues;
> + int n_queues; /* total number of virtqueues (rx, tx, ctrl) */
> QVirtQueue **queues;
> };
FYI, I've queued this patch now in the qtest branch:
https://gitlab.com/huth/qemu/commits/qtest-next
(with the typo fixed, obviously)
Thomas