Skip to contentSkip to conversation

r8169: Use napi_schedule_irqoff()

PATCH Superseded Matt Vollrath 1 participant 1 message Apr 11

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 r8169: Use napi_schedule_irqoff()

napi_schedule() masks hard interrupts while doing its work, which is redundant when called from an interrupt handler where hard interrupts are already masked. Use napi_schedule_irqoff() instead to bypass this redundant masking. This is an optimization.

Tested on a Lenovo RTL8168h/8111h.

---
 drivers/net/ethernet/realtek/r8169_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169_main.c +1 -1
index 791277e750ba..4c0ad0de3410 100644
@@ -4873,7 +4873,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
 		phy_mac_interrupt(tp->phydev);
 
 	rtl_irq_disable(tp);
-	napi_schedule(&tp->napi);
+	napi_schedule_irqoff(&tp->napi);
 out:
 	rtl_ack_events(tp, status);
 
Signature · 1 line
2.43.0