* [PATCH net-next] net: macb: Use napi_schedule_irqoff() in IRQ handler
@ 2026-04-07 0:45 Kevin Hao
2026-04-10 3:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Hao @ 2026-04-07 0:45 UTC (permalink / raw)
To: Nicolas Ferre, Claudiu Beznea, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Sebastian Andrzej Siewior, Clark Williams, Steven Rostedt
Cc: netdev, linux-rt-devel, Kevin Hao
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>
---
drivers/net/ethernet/cadence/macb_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 6ec7b110dc7219ca337de4c6f0cbe38bb11558b5..322545b3be23f8d2c4ca2e3da61e057496458eab 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -2149,7 +2149,7 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
*/
queue_writel(queue, IDR, bp->rx_intr_mask);
macb_queue_isr_clear(bp, queue, MACB_BIT(RCOMP));
- napi_schedule(&queue->napi_rx);
+ napi_schedule_irqoff(&queue->napi_rx);
}
if (status & (MACB_BIT(TCOMP) |
@@ -2162,7 +2162,7 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
wmb(); // ensure softirq can see update
}
- napi_schedule(&queue->napi_tx);
+ napi_schedule_irqoff(&queue->napi_tx);
}
if (unlikely(status & MACB_INT_MISC_FLAGS))
---
base-commit: 816f193dd0d95246f208590924dd962b192def78
change-id: 20260404-macb-napi-irqoff-12b3f4d9799b
Best regards,
--
Kevin Hao <haokexin@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-next] net: macb: Use napi_schedule_irqoff() in IRQ handler
2026-04-07 0:45 [PATCH net-next] net: macb: Use napi_schedule_irqoff() in IRQ handler Kevin Hao
@ 2026-04-10 3:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-04-10 3:40 UTC (permalink / raw)
To: Kevin Hao
Cc: nicolas.ferre, claudiu.beznea, andrew+netdev, davem, edumazet,
kuba, pabeni, bigeasy, clrkwllms, rostedt, netdev, linux-rt-devel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 07 Apr 2026 08:45:39 +0800 you wrote:
> 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>
>
> [...]
Here is the summary with links:
- [net-next] net: macb: Use napi_schedule_irqoff() in IRQ handler
https://git.kernel.org/netdev/net-next/c/a17d3c3d0cb2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-10 3:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07 0:45 [PATCH net-next] net: macb: Use napi_schedule_irqoff() in IRQ handler Kevin Hao
2026-04-10 3:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox