[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] virtio-net: notify backend with number of q
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] virtio-net: notify backend with number of queue pairs setup |
Date: |
Tue, 16 Jan 2018 05:07:31 +0200 |
On Fri, Jan 12, 2018 at 03:56:58PM +0100, Maxime Coquelin wrote:
> Signed-off-by: Maxime Coquelin <address@hidden>
> ---
> hw/net/virtio-net.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 38674b08aa..b8908c98ed 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -561,6 +561,7 @@ static int peer_detach(VirtIONet *n, int index)
>
> static void virtio_net_set_queues(VirtIONet *n)
> {
> + NetClientState *nc = qemu_get_queue(n->nic);
> int i;
> int r;
>
> @@ -568,6 +569,10 @@ static void virtio_net_set_queues(VirtIONet *n)
> return;
> }
>
> + if (get_vhost_net(nc->peer)) {
> + vhost_net_set_queue_num(nc->peer, n->curr_queues);
> + }
> +
> for (i = 0; i < n->max_queues; i++) {
> if (i < n->curr_queues) {
> r = peer_attach(n, i);
Seems wrong to me.
curr_queues isn't the max # of queues configured as the documentation says.
It's the number of queues currently in use by driver.
> --
> 2.14.3