Message ID | 78c7f2fb-9772-1015-8c1d-632cbdff253f@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 7274c4147afbf46f45b8501edbdad6da8cd013b9 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] r8169: don't try to disable interrupts if NAPI is scheduled already | expand |
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
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);
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(-)