igb/igc: use napi_schedule_irqoff() instead of napi_schedule()
Subsystems (3)
cover igb/igc: use napi_schedule_irqoff() instead of napi_schedule()
This patch set is meant to replace the calls to napi_schedule with napi_schedule_irqoff as this should help to reduce the interrupt overhead slightly by removing the unneeded call to local_irq_save and local_irq_restore.
In the interrupt path, callers of napi_schedule() are invoked with local IRQ disabled, so napi_schedule_irqoff() can be used instead.
This series applies the same optimization that was done for other drivers in [1] to the igb/igc driver.
Daiki Harada (2):
igb: use napi_schedule_irqoff() instead of napi_schedule()
igc: use napi_schedule_irqoff() instead of napi_schedule()
drivers/net/ethernet/intel/igb/igb_main.c | 6 +++--- drivers/net/ethernet/intel/igc/igc_main.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.53.0
PATCH 1/2 igb: use napi_schedule_irqoff() instead of napi_schedule()
Replace napi_schedule() with napi_schedule_irqoff() in the interrupt handler path in igb driver
Tested on QEMU with igb NIC emulation (-nic user,model=igb)
--- drivers/net/ethernet/intel/igb/igb_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/igb/igb_main.c +3 -3
@@ -7158,7 +7158,7 @@ static irqreturn_t igb_msix_ring(int irq, void *data)/* Write the ITR value calculated from the previous interrupt. */ igb_write_itr (q_vector); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
@@ -8199,7 +8199,7 @@ static irqreturn_t igb_intr_msi(int irq, void *data)if (icr &E1000_ICR_TS )igb_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
@@ -8245,7 +8245,7 @@ static irqreturn_t igb_intr(int irq, void *data)if (icr &E1000_ICR_TS )igb_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
Signature · 1 line
2.53.0
PATCH 2/2 igc: use napi_schedule_irqoff() instead of napi_schedule()
In reply to Daiki HaradaReplace napi_schedule() with napi_schedule_irqoff() in the interrupt handler path in igc driver Tested on Intel Corporation Ethernet Controller I226-V.
--- drivers/net/ethernet/intel/igc/igc_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/igc/igc_main.c +3 -3
@@ -5688,7 +5688,7 @@ static irqreturn_t igc_msix_ring(int irq, void *data)/* Write the ITR value calculated from the previous interrupt. */ igc_write_itr (q_vector); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
@@ -6059,7 +6059,7 @@ static irqreturn_t igc_intr_msi(int irq, void *data)if (icr &IGC_ICR_TS )igc_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
@@ -6105,7 +6105,7 @@ static irqreturn_t igc_intr(int irq, void *data)if (icr &IGC_ICR_TS )igc_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; }
Signature · 1 line
2.53.0
RE: [Intel-wired-lan] [PATCH iwl-next v1 1/2] igb: use napi_schedule_irqoff() instead of napi_schedule()
In reply to Daiki HaradaQuoted 64 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Daiki Harada
Sent: Tuesday, March 31, 2026 12:39 PM
To: [email protected]; [email protected]; linux- [email protected]
Cc: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Daiki Harada <[email protected]>; Kohei Enju <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next v1 1/2] igb: usenapi_schedule_irqoff()instead ofnapi_schedule()Replace
napi_schedule()withnapi_schedule_irqoff()in the interrupt handler path in igb driverTested on QEMU with igb NIC emulation (-nic user,model=igb)
Suggested-by Kohei Enju <[email protected]>Signed-off-by Daiki Harada <[email protected]>--- drivers/net/ethernet/intel/igb/igb_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/igb/igb_main.c +1
-1@@ -7158,7 +7158,7 @@ static irqreturn_t igb_msix_ring(int irq, void *data)/* Write the ITR value calculated from the previous interrupt. */ igb_write_itr (q_vector); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);drivers/net/ethernet/intel/igb/igb_main.c +1
-1return IRQ_HANDLED ; }@@ -8199,7 +8199,7 @@ static irqreturn_t igb_intr_msi(int irq, void *data)if (icr &E1000_ICR_TS )igb_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ;}
drivers/net/ethernet/intel/igb/igb_main.c +1
-2@@ -8245,7 +8245,7 @@ static irqreturn_t igb_intr(int irq, void *data)if (icr &E1000_ICR_TS )igb_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; } --
Quoted 1 line
2.53.0
RE: [Intel-wired-lan] [PATCH iwl-next v1 2/2] igc: use napi_schedule_irqoff() instead of napi_schedule()
In reply to Daiki HaradaQuoted 63 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Daiki Harada
Sent: Tuesday, March 31, 2026 12:39 PM
To: [email protected]; [email protected]; linux- [email protected]
Cc: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Daiki Harada <[email protected]>; Kohei Enju <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next v1 2/2] igc: usenapi_schedule_irqoff()instead ofnapi_schedule()Replace
napi_schedule()withnapi_schedule_irqoff()in the interrupt handler path in igc driver Tested on Intel Corporation Ethernet Controller I226-V.Suggested-by Kohei Enju <[email protected]>Signed-off-by Daiki Harada <[email protected]>--- drivers/net/ethernet/intel/igc/igc_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/igc/igc_main.c +1
-1@@ -5688,7 +5688,7 @@ static irqreturn_t igc_msix_ring(int irq, void *data)/* Write the ITR value calculated from the previous interrupt. */ igc_write_itr (q_vector); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);drivers/net/ethernet/intel/igc/igc_main.c +1
-1return IRQ_HANDLED ; }@@ -6059,7 +6059,7 @@ static irqreturn_t igc_intr_msi(int irq, void *data)if (icr &IGC_ICR_TS )igc_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ;}
drivers/net/ethernet/intel/igc/igc_main.c +1
-2@@ -6105,7 +6105,7 @@ static irqreturn_t igc_intr(int irq, void *data)if (icr &IGC_ICR_TS )igc_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ; } --
Quoted 1 line
2.53.0
Ruinskiy, Dima
Reviewed-byRe: [Intel-wired-lan] [PATCH iwl-next v1 2/2] igc: use napi_schedule_irqoff() instead of napi_schedule()
Quoted 60 lines · Aleksandr
Quoted 60 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Daiki Harada
Sent: Tuesday, March 31, 2026 12:39 PM
To: [email protected]; [email protected]; linux- [email protected]
Cc: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Daiki Harada <[email protected]>; Kohei Enju <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next v1 2/2] igc: usenapi_schedule_irqoff()instead ofnapi_schedule()Replace
napi_schedule()withnapi_schedule_irqoff()in the interrupt handler path in igc driver Tested on Intel Corporation Ethernet Controller I226-V.Suggested-by Kohei Enju <[email protected]>Signed-off-by Daiki Harada <[email protected]>--- drivers/net/ethernet/intel/igc/igc_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/igc/igc_main.c +1
-1@@ -5688,7 +5688,7 @@ static irqreturn_t igc_msix_ring(int irq, void *data)/* Write the ITR value calculated from the previous interrupt. */ igc_write_itr (q_vector); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED; }drivers/net/ethernet/intel/igc/igc_main.c +1
-1@@ -6059,7 +6059,7 @@ static irqreturn_t igc_intr_msi(int irq, void *data)if (icr &IGC_ICR_TS )igc_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);return IRQ_HANDLED ;}drivers/net/ethernet/intel/igc/igc_main.c +1
-1@@ -6105,7 +6105,7 @@ static irqreturn_t igc_intr(int irq, void *data)if (icr &IGC_ICR_TS )igc_tsync_interrupt (adapter); -napi_schedule (&q_vector->napi); +napi_schedule_irqoff (&q_vector->napi);
Quoted 7 lines
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_main.c +0
-1return IRQ_HANDLED ; } --2.53.0
Reviewed-by Aleksandr Loktionov <[email protected]>
RE: [Intel-wired-lan] [PATCH iwl-next v1 1/2] igb: use napi_schedule_irqoff() instead of napi_schedule()
In reply to Daiki HaradaQuoted 9 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Daiki Harada
Sent: 31 March 2026 16:09
To: [email protected]; [email protected]; [email protected]
Cc: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Daiki Harada <[email protected]>; Kohei Enju <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next v1 1/2] igb: usenapi_schedule_irqoff()instead ofnapi_schedule()Replace
napi_schedule()withnapi_schedule_irqoff()in the interrupt handler path in igb driver
Quoted 8 lines
Tested on QEMU with igb NIC emulation (-nic user,model=igb)
Suggested-by Kohei Enju <[email protected]>Signed-off-by Daiki Harada <[email protected]>---
drivers/net/ethernet/intel/igb/igb_main.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)
Kadosh, MoriyaX
Tested-byRe: [Intel-wired-lan] [PATCH iwl-next v1 2/2] igc: use napi_schedule_irqoff() instead of napi_schedule()
In reply to Ruinskiy, DimaQuoted 61 lines · Dima
Quoted 60 lines · Aleksandr
Quoted 60 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Daiki Harada
Sent: Tuesday, March 31, 2026 12:39 PM
To: [email protected]; [email protected]; linux- [email protected]
Cc: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Daiki Harada <[email protected]>; Kohei Enju <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next v1 2/2] igc: usenapi_schedule_irqoff()instead ofnapi_schedule()Replace
napi_schedule()withnapi_schedule_irqoff()in the interrupt handler path in igc driver Tested on Intel Corporation Ethernet Controller I226-V.Suggested-by Kohei Enju <[email protected]>Signed-off-by Daiki Harada <[email protected]>---
drivers/net/ethernet/intel/igc/igc_main.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/igc/igc_main.c +1
-1@@ -5688,7 +5688,7 @@ static irqreturn_t igc_msix_ring(int irq, void *data) /* Write the ITR value calculated from the previous interrupt. */ igc_write_itr(q_vector); - napi_schedule(&q_vector->napi); + napi_schedule_irqoff(&q_vector->napi);return
IRQ_HANDLED;
}drivers/net/ethernet/intel/igc/igc_main.c +1
-1@@ -6059,7 +6059,7 @@ static irqreturn_t igc_intr_msi(int irq, void *data) if (icr & IGC_ICR_TS) igc_tsync_interrupt(adapter); - napi_schedule(&q_vector->napi); + napi_schedule_irqoff(&q_vector->napi); return IRQ_HANDLED;}
drivers/net/ethernet/intel/igc/igc_main.c +1
-1@@ -6105,7 +6105,7 @@ static irqreturn_t igc_intr(int irq, void *data) if (icr & IGC_ICR_TS) igc_tsync_interrupt(adapter); - napi_schedule(&q_vector->napi); + napi_schedule_irqoff(&q_vector->napi);
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
drivers/net/ethernet/intel/igc/igc_main.c +0
-0return IRQ_HANDLED; }Signature · 1 line
2.53.0Reviewed-by Aleksandr Loktionov <[email protected]>Reviewed-by Dima Ruinskiy <[email protected]>