[PATCH net-next v3 0/2] net: stmmac: Avoid freeing and re-requesting IRQ during XDP set prog

From: Daniel Thompson

Date: Thu Oct 15 2026 - 12:31:13 EST


Currently stmmac will run a full cycle of IRQ tear down and setup when
setting up a new XDP program. This makes tuning TSN systems difficult
because whenever a new XDP program is installed then the irq threads will
be stopped and restarted which will undo any thread tuning.

This series addresses this issue by replacing the free_irq() with a disable of
DMA interrupts in the XDP paths. The series consists of a preparative patch that
extends the DMA interrupt enable/disable functions and then follows with the
meaningful change.

These changes were developed (and tested) as part of the TC956x work that
Alex Elder and I have been working on. However the change should work with
any driver that uses the stmmac core and there is no dependency between these
changes that that work.

Signed-off-by: Daniel Thompson <daniel@xxxxxxxxxxxx>
---
Changes in v3:
- Switch to more aggressive interrupt masking to avoid problems with
concurrent normal/abnormal DMA interrupts.
- Changed the enable_dma_irq/disable_dma_irq ops prototype (to support the
above)
- Link to v2: https://lore.kernel.org/r/20260730-tc956x-stmmac-no_irq_teardown-v2-1-a6c31932ba84@xxxxxxxxxxxx

Changes in v2:
- Added net-next prefix
- Remove stmmac_init_chan() from stmmac_xdp_open() because it will re-enable
interrupts
- Link to v1: https://lore.kernel.org/r/20260706-tc956x-stmmac-no_irq_teardown-v1-1-df009d0272bf@xxxxxxxxxxxx

---
Daniel Thompson (2):
net: stmmac: Introduce group arguments for enable/disable_dma_irq
net: stmmac: Avoid freeing and re-requesting IRQ during XDP set prog

drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 12 +--
drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h | 4 +-
drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 29 ++++---
drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h | 4 +-
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 29 ++++---
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 29 ++++---
drivers/net/ethernet/stmicro/stmmac/hwif.h | 10 ++-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 89 +++++++++++++++-------
8 files changed, 135 insertions(+), 71 deletions(-)
---
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
change-id: 20260706-tc956x-stmmac-no_irq_teardown-8a7592b9f8c1

Best regards,
--
Daniel Thompson <daniel@xxxxxxxxxxxx>