]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
virtio_net: disable cb when NAPI is busy-polled
authorLongjun Tang <tanglongjun@kylinos.cn>
Mon, 29 Jun 2026 02:42:30 +0000 (10:42 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 1 Jul 2026 00:03:37 +0000 (17:03 -0700)
commit1eb8fc67ca41db71c90866ff76c990d85247daef
tree1a6e1881743f8d9766d4d2e301f163c1706f8a00
parent976c19de0f22a857ba0112f39635f8fd7a257568
virtio_net: disable cb when NAPI is busy-polled

When busy-poll is active, napi_schedule_prep() returns false in
virtqueue_napi_schedule(), so virtqueue_disable_cb() is skipped.
The device may keep firing irqs until reaches virtqueue_napi_complete().
Under load (received == budget), it will lead to a large number
of spurious interrupts.

Fix it by disabling the callback at the virtnet_poll() entry.
This keeps the callback off while we poll and it is re-enabled by
virtqueue_napi_complete() when going idle.

Fixes: ceef438d613f ("virtio_net: remove custom busy_poll")
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Longjun Tang <tanglongjun@kylinos.cn>
Link: https://patch.msgid.link/20260629024230.37325-1-lange_tang@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/virtio_net.c