r8169: don't try to disable interrupts if NAPI is scheduled already
Heiner Kallweit
maintainerPATCH 1/1 r8169: don't try to disable interrupts if NAPI is scheduled already
There's no benefit in trying to disable interrupts if NAPI is scheduled already. This allows us to save a PCI write in this case.
Signed-off-by Heiner Kallweit <[email protected]>
--- drivers/net/ethernet/realtek/r8169_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +4 -2
@@ -4544,8 +4544,10 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)rtl_schedule_task (tp,RTL_FLAG_TASK_RESET_PENDING ); } -rtl_irq_disable (tp); -napi_schedule (&tp->napi); +if (napi_schedule_prep (&tp->napi)) { +rtl_irq_disable (tp); +__napi_schedule (&tp->napi); + } out:rtl_ack_events (tp, status);
Signature · 1 line
2.30.0
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 7 lines · On Fri, 5 Feb 2021 22:48:53 +0100 you wrote:
There's no benefit in trying to disable interrupts if NAPI is scheduled already. This allows us to save a PCI write in this case.
Signed-off-by Heiner Kallweit <[email protected]>--- drivers/net/ethernet/realtek/r8169_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Here is the summary with links:
- [net-next] r8169: don't try to disable interrupts if NAPI is scheduled already
https://git.kernel.org/netdev/net-next/c/7274c4147afb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html