Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4166625 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller
Browse files

virtio_net: enable napi for all possible queues during open



Commit 55257d72 (virtio-net: fill only rx
queues which are being used) only does the napi enabling during open for
curr_queue_pairs. This will break multiqueue receiving since napi of new queues
were still disabled after changing the number of queues.

This patch fixes this by enabling napi for all possible queues during open.

Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 35f079eb
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -636,7 +636,8 @@ static int virtnet_open(struct net_device *dev)
	struct virtnet_info *vi = netdev_priv(dev);
	int i;

	for (i = 0; i < vi->curr_queue_pairs; i++) {
	for (i = 0; i < vi->max_queue_pairs; i++) {
		if (i < vi->curr_queue_pairs)
			/* Make sure we have some buffers: if oom use wq. */
			if (!try_fill_recv(&vi->rq[i], GFP_KERNEL))
				schedule_delayed_work(&vi->refill, 0);