From: Longjun Tang <[email protected]> virtnet_poll() is shared between NAPI softirq context and the busy-poll path (sk_busy_loop). In the busy-poll path the caller drives the loop directly and does not rely on interrupts to schedule NAPI; keeping callbacks enabled is wasteful and risks a flood of IRQ_NONE returns that can trigger the kernel's spurious-IRQ detector.
Signed-off-by: Longjun Tang <[email protected]> --- drivers/net/virtio_net.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 72d6a9c6a5a2..df365fba2c40 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -3078,6 +3078,9 @@ static int virtnet_poll(struct napi_struct *napi, int budget) unsigned int xdp_xmit = 0; bool napi_complete; + if (READ_ONCE(napi->state) & NAPIF_STATE_IN_BUSY_POLL) + virtqueue_disable_cb(rq->vq); + virtnet_poll_cleantx(rq, budget); received = virtnet_receive(rq, budget, &xdp_xmit); -- 2.43.0
