openwrt/target/linux
Markus Stockhausen 203c9f063b realtek: avoid interrupt storm on mass packet receive
RTL83xx devices have two types of receive interrupts for each of its
8 rings. One for packet received and another for ring overflow. When
the switch is flooded with incoming packets the receive handler will
disable the packet receive notification but still keeps the overflow
notification enabled. While the receive path "slowly" processes the
received packets each new packet triggers the overflow IRQ again. The
device becomes unresponsive and eventually produces messages like:

[18441.709764] rcu: Stack dump where RCU GP kthread last ran:
[18441.727892] Sending NMI from CPU 1 to CPUs 0:
[18441.742300] NMI backtrace for cpu 0 skipped: idling at 0x8080e994
[18415.251700] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[18415.271350] rcu:     0-...!: (0 ticks this GP) idle=d740/0/0x0 ...
[18415.303046] rcu:     (detected by 1, t=6004 jiffies, g=230925, ...
[18415.326095] Sending NMI from CPU 1 to CPUs 0:
[18415.340540] NMI backtrace for cpu 0

Fix this issue by always disabling receive and overflow interrupts at
the same time.

Test with hping3 --udp -p 5021 -d 1400 --flood 192.168.2.72

Before (3sec run):
[183260.324846] rtl838x-eth 1b00a300.ethernet eth0: RX buffer overrun: status 0x101, mask: 0x7ffeff
[183260.340524] rtl838x-eth 1b00a300.ethernet eth0: RX buffer overrun: status 0x1, mask: 0x7ffeff
[183260.345799] net_ratelimit: 489997 callbacks suppressed

After (3 sec run):
[  373.981479] rtl838x-eth 1b00a300.ethernet eth0: rx ring overrun: status 0x101, mask: 0x7fffff
[  374.031118] rtl838x-eth 1b00a300.ethernet eth0: rx ring overrun: status 0x101, mask: 0x7fffff
[  377.919996] net_ratelimit: 34 callbacks suppressed

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19365
(cherry picked from commit 963ee6ac3f)
Signed-off-by: Felix Baumann <felix.bau@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19891
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-31 19:08:04 +02:00
..
airoha airoha: backport upstream patch for Flow Offload support for AN7581 2025-08-20 08:47:47 +02:00
apm821xx apm821xx: NETGEAR WNDR4700: Fix compat version 2025-01-27 23:53:29 +01:00
archs38 kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
armsr armsr: remove 'console=tty1' from kernel command line 2025-08-31 18:30:08 +02:00
at91 kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
ath79 ath79: add calibtation variant for Xiaomi AIoT AC2350 2025-08-31 18:43:06 +02:00
bcm27xx kernel: bump 6.6 to 6.6.102 2025-08-28 21:17:44 +02:00
bcm47xx kernel: bump 6.6 to 6.6.78 2025-02-25 23:16:17 +01:00
bcm53xx kernel: bump 6.6 to 6.6.97 2025-07-17 20:49:02 +02:00
bcm4908 kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
bmips bmips: add missing NAND config symbol 2025-05-14 11:39:20 +02:00
d1 kernel: bump 6.6 to 6.6.93 2025-06-15 13:37:46 +02:00
gemini kernel: bump 6.6 to 6.6.95 2025-07-06 14:51:08 +02:00
generic kernel: bump 6.6 to 6.6.102 2025-08-28 21:17:44 +02:00
imx imx: venice: disable PCI AER 2025-06-25 21:02:35 +02:00
ipq40xx kernel: bump 6.6 to 6.6.102 2025-08-28 21:17:44 +02:00
ipq806x ipq806x: fix Extreme Networks AP3935 LAN/WAN ports 2025-06-22 13:40:28 +02:00
ixp4xx ixp4xx: Break out mv88e6060 DSA switch to package 2025-01-04 19:27:05 +01:00
kirkwood kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
lantiq kernel: bump 6.6 to 6.6.88 2025-05-07 20:53:16 +02:00
layerscape kernel: bump 6.6 to 6.6.88 2025-05-07 20:53:16 +02:00
loongarch64 generic: globally enable CONFIG_PCPU_DEV_REFCNT 2025-03-19 09:24:43 +01:00
malta kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
mediatek mediatek: Remove modules.builtin file 2025-08-24 15:30:57 +02:00
mpc85xx mpc85xx: tl-wdr4900: add back 5ghz LED 2025-08-13 09:58:03 +02:00
mvebu kernel: bump 6.6 to 6.6.95 2025-07-06 14:51:08 +02:00
mxs mxs: run kernel_oldconfig 2024-11-28 18:48:55 +00:00
octeon octeon: ubnt-usg: add board name to supported devices 2025-01-27 02:10:46 +01:00
omap kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
pistachio kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
qoriq kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
qualcommax kernel: bump 6.6 to 6.6.94 2025-06-29 15:19:56 +02:00
ramips ramips: fix TP-Link mr600 radio partition offset 2025-08-24 15:30:57 +02:00
realtek realtek: avoid interrupt storm on mass packet receive 2025-08-31 19:08:04 +02:00
rockchip rockchip: backport PCIe MSI fixes for RK356x SoC 2025-07-06 17:03:31 +02:00
sifiveu kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
siflower kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
starfive kernel: bump 6.6 to 6.6.97 2025-07-17 20:49:02 +02:00
stm32 stm32: add missing config option 2025-05-28 13:22:00 +02:00
sunxi kernel: bump 6.6 to 6.6.61 2024-11-24 22:46:21 +01:00
tegra tegra: bring back workaround for spurious interrupts 2025-07-28 23:20:46 +02:00
uml uml: fix glibc-static check with GCC14 2024-06-22 22:06:06 +02:00
x86 kernel: bump 6.6 to 6.6.97 2025-07-17 20:49:02 +02:00
zynq kernel: filter out compiler opts from config 2024-11-28 18:47:54 +00:00
Makefile linux: fix missing default packages in profiles.json 2025-01-03 11:14:12 +01:00