virtio_net: enable napi after enabling new queues
Subsystems (4)
PATCH 1/1 virtio_net: enable napi after enabling new queues
Commit 55257d72bd1c51f25106350f4983ec19f62ed1fa (virtio-net: fill only rx queues which are being used) forgets to enable napi for new enabled queues which breaks the multiqueue receiving. This patch fixes it.
Cc Sasha Levin <[email protected]>
Signed-off-by Jason Wang <[email protected]>
--- drivers/net/virtio_net.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/virtio_net.c +3 -1
@@ -914,9 +914,11 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) queue_pairs);return -EINVAL ; }else { -for (i = vi->curr_queue_pairs; i < queue_pairs; i++) +for (i = vi->curr_queue_pairs; i < queue_pairs; i++) {if (!try_fill_recv (&vi->rq[i],GFP_KERNEL ))schedule_delayed_work (&vi->refill,0 ); +virtnet_napi_enable (&vi->rq[i]); + } vi->curr_queue_pairs = queue_pairs; }
Signature · 1 line
1.7.1
Quoted 17 lines · Jason Wang
Commit
55257d72bd1c51f25106350f4983ec19f62ed1fa(virtio-net: fill only rx queues which are being used) forgets to enable napi for new enabled queues which breaks the multiqueue receiving. This patch fixes it.Cc Sasha Levin <[email protected]>Signed-off-by Jason Wang <[email protected]>--- drivers/net/virtio_net.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)drivers/net/virtio_net.c +0
-0@@ -914,9 +914,11 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) queue_pairs);return -EINVAL ;
drivers/net/virtio_net.c static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) · line 924
Quoted 10 lines
drivers/net/virtio_net.c +3
-1}else { -for (i = vi->curr_queue_pairs; i < queue_pairs; i++) +for (i = vi->curr_queue_pairs; i < queue_pairs; i++) {if (!try_fill_recv (&vi->rq[i],GFP_KERNEL ))schedule_delayed_work (&vi->refill,0 ); +virtnet_napi_enable (&vi->rq[i]); + } vi->curr_queue_pairs = queue_pairs; }
A bug were found in this patch, will send a new version.