virtio_net: enable napi for all possible queues during open
Commit 55257d72bd1c51f25106350f4983ec19f62ed1fa (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: Jason Wang <jasowang@redhat.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
35f079ebbc
commit
e4166625ed
@ -636,10 +636,11 @@ static int virtnet_open(struct net_device *dev)
|
|||||||
struct virtnet_info *vi = netdev_priv(dev);
|
struct virtnet_info *vi = netdev_priv(dev);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < vi->curr_queue_pairs; i++) {
|
for (i = 0; i < vi->max_queue_pairs; i++) {
|
||||||
/* Make sure we have some buffers: if oom use wq. */
|
if (i < vi->curr_queue_pairs)
|
||||||
if (!try_fill_recv(&vi->rq[i], GFP_KERNEL))
|
/* Make sure we have some buffers: if oom use wq. */
|
||||||
schedule_delayed_work(&vi->refill, 0);
|
if (!try_fill_recv(&vi->rq[i], GFP_KERNEL))
|
||||||
|
schedule_delayed_work(&vi->refill, 0);
|
||||||
virtnet_napi_enable(&vi->rq[i]);
|
virtnet_napi_enable(&vi->rq[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user