Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: macb: Use napi_schedule_irqoff() in IRQ handler

For non-PREEMPT_RT kernels, the IRQ handler runs with interrupts
disabled, allowing the use of napi_schedule_irqoff() to save a pair of
local_irq_{save,restore} operations. For PREEMPT_RT kernels,
napi_schedule_irqoff() behaves identically to napi_schedule().

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Link: https://patch.msgid.link/20260407-macb-napi-irqoff-v1-1-61bec60047d7@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Kevin Hao and committed by
Jakub Kicinski
a17d3c3d 5ecbebc9

+2 -2
+2 -2
drivers/net/ethernet/cadence/macb_main.c
··· 2149 2149 */ 2150 2150 queue_writel(queue, IDR, bp->rx_intr_mask); 2151 2151 macb_queue_isr_clear(bp, queue, MACB_BIT(RCOMP)); 2152 - napi_schedule(&queue->napi_rx); 2152 + napi_schedule_irqoff(&queue->napi_rx); 2153 2153 } 2154 2154 2155 2155 if (status & (MACB_BIT(TCOMP) | ··· 2162 2162 wmb(); // ensure softirq can see update 2163 2163 } 2164 2164 2165 - napi_schedule(&queue->napi_tx); 2165 + napi_schedule_irqoff(&queue->napi_tx); 2166 2166 } 2167 2167 2168 2168 if (unlikely(status & MACB_INT_MISC_FLAGS))