* [PATCH net-next] r8169: don't try to disable interrupts if NAPI is scheduled already
@ 2021-02-05 21:48 Heiner Kallweit
2021-02-06 23:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2021-02-05 21:48 UTC (permalink / raw)
To: Jakub Kicinski, David Miller, Realtek linux nic maintainers; +Cc: netdev
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 <hkallweit1@gmail.com>
---
drivers/net/ethernet/realtek/r8169_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index eb4c2e678..c15c285a0 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -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);
--
2.30.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] r8169: don't try to disable interrupts if NAPI is scheduled already
2021-02-05 21:48 [PATCH net-next] r8169: don't try to disable interrupts if NAPI is scheduled already Heiner Kallweit
@ 2021-02-06 23:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-06 23:20 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: kuba, davem, nic_swsd, netdev
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
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 <hkallweit1@gmail.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-06 23:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 21:48 [PATCH net-next] r8169: don't try to disable interrupts if NAPI is scheduled already Heiner Kallweit
2021-02-06 23:20 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.