Skip to content

Conversation

xypron
Copy link

@xypron xypron commented Dec 28, 2015

Up to now only package libtldl is created form source package
GNU libtool.

A new package libtool containing libtoolize is provided.

Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de

Up to now only package libtldl is created form source package
GNU libtool.

A new package libtool containing libtoolize is provided.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
@sbyx
Copy link
Member

sbyx commented Dec 28, 2015

This is a read-only mirror.

@sbyx sbyx closed this Dec 28, 2015
@piojan piojan mentioned this pull request Nov 21, 2016
@lightingland lightingland mentioned this pull request Jan 6, 2017
gportay pushed a commit to gportay/openwrt that referenced this pull request Jul 16, 2017
musashino205 added a commit to musashino-build/openwrt that referenced this pull request Jan 3, 2018
ramips: Add the patch to reset m25p80
jow- pushed a commit that referenced this pull request Jun 8, 2018
8e29d86 linuxrc: remove superfluous shebang line
12d2045 gitignore: remove Windows stuff
57d8969 Add travis hint
8edf4cc sdimage: use fsync before closing the device (fixes #1)
d395b31 uuc: fix some compiler warnings

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
13hakta added a commit to 13hakta/openwrt that referenced this pull request Jun 25, 2018
Update external interface init according to mapped ports for RTL8367RB:
ext port openwrt#1 = extif0
ext port openwrt#2 = extif1

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
13hakta added a commit to 13hakta/openwrt that referenced this pull request Jun 25, 2018
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports.
RTL8367RB has ports indexed as openwrt#1,openwrt#2 (PHY openwrt#6, openwrt#7).
RTL8367R-VB has ports indexed as #0,openwrt#1 (PHY openwrt#5,openwrt#6).
Map ports so that extif0 complies to external port 0 or 1 depending on chip ID.

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
jow- pushed a commit that referenced this pull request Aug 28, 2018
Netgear WNR612v2 flashed with recent OpenWrt builds suffers from kernel
panic at boot during wireless chip initialization, making device
unusable:

 ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
 ath: phy0: Enable LNA combining
 CPU 0 Unable to handle kernel paging request at virtual address 1000fee1, epc == 801d08f0, ra == 801d0d90
 Oops[#1]:
 CPU: 0 PID: 469 Comm: kmodloader Not tainted 4.9.120 #0
 [ ... register dump etc ... ]
 Kernel panic - not syncing: Fatal exception
 Rebooting in 1 seconds..

This simple patch fixes above error. It keeps LED table in memory after
kernel init phase for ath9k driver to operate correctly (__initdata
removed).

Also, another bug is fixed - correct array size is provided to function
that adds platform LEDs (this device has only 1 connected to Wifi chip)
preventing code from going outside array bounds.

Fixes: 1f5ea4e ("ar71xx: add correct named default wireless led by using platform leds")

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
[trimmed commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
jow- pushed a commit that referenced this pull request Aug 28, 2018
Netgear WNR612v2 flashed with recent OpenWrt builds suffers from kernel
panic at boot during wireless chip initialization, making device
unusable:

 ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
 ath: phy0: Enable LNA combining
 CPU 0 Unable to handle kernel paging request at virtual address 1000fee1, epc == 801d08f0, ra == 801d0d90
 Oops[#1]:
 CPU: 0 PID: 469 Comm: kmodloader Not tainted 4.9.120 #0
 [ ... register dump etc ... ]
 Kernel panic - not syncing: Fatal exception
 Rebooting in 1 seconds..

This simple patch fixes above error. It keeps LED table in memory after
kernel init phase for ath9k driver to operate correctly (__initdata
removed).

Also, another bug is fixed - correct array size is provided to function
that adds platform LEDs (this device has only 1 connected to Wifi chip)
preventing code from going outside array bounds.

Fixes: 1f5ea4e ("ar71xx: add correct named default wireless led by using platform leds")

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
[trimmed commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
jow- pushed a commit that referenced this pull request Oct 8, 2018
This reverts commit 7af1fb9.

With the RPS balancer patch, both my APU2s are crashing, sometimes just
after a few minutes of uptime.

[ 6241.170132] BUG: unable to handle kernel paging request at ffffffffa20a75a8
[ 6241.177248] IP: get_rps_cpu+0x41c/0x440
[ 6241.181140] PGD 2012067 P4D 2012067 PUD 2013063 PMD 0
[ 6241.186370] Oops: 0000 [#1] SMP NOPTI
[ 6241.190080] Modules linked in: pppoe ppp_async pptp pppox ppp_mppe ppp_generic nf_nat_pptp nf_flow_table_ipv6 nf_flow_table_ipv4 nf_flow_table_inet nf_conntrack_pptp lzo iptable_nat ipt_REJECT ipt_MASQUERADE ftdi_sio xt_time xt_tcpudp xt_tcpmss xt_string xt_statistic xt_state xt_recent xt_quota xt_policy xt_pkttype xt_owner xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_bpf xt_addrtype xt_TCPMSS xt_REDIRECT xt_NFQUEUE xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY wireguard usbserial ts_fsm ts_bm spidev slhc rfcomm nft_set_rbtree nft_set_hash nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir_ipv4 nft_redir nft_quota nft_numgen nft_nat nft_meta nft_masq_ipv4 nft_masq
[ 6241.261735]  nft_log nft_limit nft_flow_offload nft_exthdr nft_ct nft_counter nft_chain_route_ipv6 nft_chain_route_ipv4 nft_chain_nat_ipv4 nfnetlink_queue nf_tables_ipv6 nf_tables_ipv4 nf_tables_inet nf_tables nf_reject_ipv4 nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_redirect nf_nat_proto_gre nf_nat_masquerade_ipv6 nf_nat_masquerade_ipv4 nf_nat_irc nf_conntrack_ipv6 nf_nat_ipv6 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat_h323 nf_nat_ftp nf_nat_amanda nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip nf_conntrack_rtcache nf_conntrack_proto_gre nf_conntrack_netlink nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp nf_conntrack_broadcast ts_kmp nf_conntrack_amanda macvlan lzo_decompress lzo_compress libcrc32c kvm irqbypass
[ 6241.333427]  iptable_raw iptable_mangle iptable_filter ipt_ah ipt_ECN ip_tables hidp hci_uart crc_ccitt cdc_acm btusb btintel br_netfilter bnep bluetooth sch_cake tcp_bbr sch_teql em_nbyte sch_codel sch_prio sch_pie act_ipt em_meta sch_gred sch_dsmark cls_basic em_cmp em_text act_police sch_sfq sch_fq sch_multiq sch_red act_connmark nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw sch_tbf sch_htb sch_hfsc sch_ingress configs evdev i2c_piix4 kfifo_buf industrialio i2c_dev xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set
[ 6241.405252]  nfnetlink ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables ip_gre gre igb i2c_algo_bit ifb ip6_vti ip_vti sit l2tp_netlink l2tp_core ipcomp6 xfrm6_tunnel xfrm6_mode_tunnel xfrm6_mode_transport xfrm6_mode_beet esp6 ah6 ipcomp xfrm4_tunnel xfrm4_mode_tunnel xfrm4_mode_transport xfrm4_mode_beet esp4 ah4 ip6_tunnel tunnel6 tunnel4 ip_tunnel veth snd_compress snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd soundcore mpls_gso mpls_iptunnel mpls_router af_key xfrm_user xfrm_ipcomp xfrm_algo br2684 atm regmap_mmio vxlan udp_tunnel ip6_udp_tunnel ecdh_generic sha512_ssse3 sha512_generic sha256_ssse3 sha1_ssse3 seqiv jitterentropy_rng drbg md5 kpp ccp_crypto rsa_generic mpi asn1_decoder akcipher ccp sha256_generic
[ 6241.477726]  sha1_generic hmac ghash_generic gcm echainiv des_generic deflate zlib_deflate ctr cmac ccm cbc authenc crypto_acompress sdhci_pltfm pf_ring sp5100_tco leds_apu2 gpio_nct5104d button_hotplug ptp pps_core
[ 6241.497122] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.14.73 #0
[ 6241.503198] Hardware name: PC Engines apu2/apu2, BIOS v4.8.0.2 20180705
[ 6241.509858] task: ffff88012a0d8000 task.stack: ffffc90000070000
[ 6241.515841] RIP: 0010:get_rps_cpu+0x41c/0x440
[ 6241.520246] RSP: 0018:ffff88012ed83db0 EFLAGS: 00010286
[ 6241.525511] RAX: 00000000ffffffff RBX: 0000000000011ae8 RCX: 0000000000000001
[ 6241.532737] RDX: 00000000ffffffff RSI: ffff88012a0d8788 RDI: 0000000000000282
[ 6241.539956] RBP: ffff88012ed83e00 R08: 0000000000000001 R09: 0000000000000000
[ 6241.547183] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff82dae2e0
[ 6241.554403] R13: ffff880124de4480 R14: 0000000000000000 R15: ffff880128120000
[ 6241.561625] FS:  0000000000000000(0000) GS:ffff88012ed80000(0000) knlGS:0000000000000000
[ 6241.569820] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 6241.575651] CR2: ffffffffa20a75a8 CR3: 00000001251da000 CR4: 00000000000406e0
[ 6241.582830] Call Trace:
[ 6241.585322]  <IRQ>
[ 6241.587372]  ? lock_acquire+0x59/0x80
[ 6241.591102]  netif_receive_skb_internal+0x1e4/0x2d0
[ 6241.596037]  napi_gro_receive+0x48/0x90
[ 6241.599948]  igb_alloc_rx_buffers+0xc97/0x1b60 [igb]
[ 6241.604981]  ? note_gp_changes+0x76/0xc0
[ 6241.608963]  net_rx_action+0x10c/0x280
[ 6241.612752]  __do_softirq+0xf0/0x22d
[ 6241.616375]  irq_exit+0x5e/0xa0
[ 6241.619573]  do_IRQ+0xee/0x110
[ 6241.622682]  common_interrupt+0x8b/0x8b
[ 6241.626556]  </IRQ>
[ 6241.628699] RIP: 0010:native_safe_halt+0x6/0x10
[ 6241.633260] RSP: 0018:ffffc90000073e10 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff3d
[ 6241.640910] RAX: ffff88012a0d8000 RBX: ffff88012a190c00 RCX: 0000000000000000
[ 6241.648110] RDX: ffff88012a0d8000 RSI: 0000000000000001 RDI: ffff88012a0d8000
[ 6241.655354] RBP: ffffc90000073e10 R08: 0000000000000006 R09: 0000000000000000
[ 6241.662554] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88012a190c64
[ 6241.669791] R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000001
[ 6241.676986]  acpi_safe_halt.part.9+0xe/0x20
[ 6241.681226]  acpi_idle_do_entry+0x2c/0x40
[ 6241.685325]  acpi_idle_enter+0x1ee/0x2b0
[ 6241.689298]  ? sched_clock+0x9/0x10
[ 6241.692839]  cpuidle_enter_state+0x1f2/0x230
[ 6241.697162]  cpuidle_enter+0x12/0x20
[ 6241.700803]  call_cpuidle+0x38/0x40
[ 6241.704335]  do_idle+0xed/0x160
[ 6241.707557]  cpu_startup_entry+0x6e/0x70
[ 6241.711557]  start_secondary+0x1b4/0x1d0
[ 6241.715536]  secondary_startup_64+0xa5/0xb0
[ 6241.719777] Code: d4 48 8d 04 9b 48 8b 35 53 a7 ac 00 48 8d 1c 43 48 83 c6 64 48 c1 e3 03 48 8d bb e8 e2 da 82 e8 cb a9 ba ff 41 8b 14 1c 48 89 d0 <48> 0f a3 15 dc dc b6 00 0f 83 46 fc ff ff 48 83 c4 28 5b 41 5c
[ 6241.739100] RIP: get_rps_cpu+0x41c/0x440 RSP: ffff88012ed83db0
[ 6241.744993] CR2: ffffffffa20a75a8
[ 6241.748373] ---[ end trace 77367d9f9830d5bc ]---

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
guidosarducci referenced this pull request in guidosarducci/openwrt Feb 21, 2019
This reverts commit 8ff0dd5.

This is a failed attempt to fix numerous but infrequent kernel crashes
observed on the MIPS Malta 32-bit big endian platform, during calls to
ntpd and wget.

The characteristic crash signature is:

[99013.615413] Call Trace:
[99013.615575] [<804c9be0>] ip_send_check+0x48/0x80
[99013.616176] [<8df04e24>] 0x8df04e24
[99013.616474] Code: 24850010  00863021  00481021 <8ca30000> 24a50004  00621021  0043182b  14c5fffb  00431021
[99013.617166]
[99013.617606] ---[ end trace b61fa7c533c1775c ]---
[99013.620786] Kernel panic - not syncing: Fatal exception in interrupt
[99013.622415] Rebooting in 3 seconds..
[99017.654903] Reboot failed -- System halted

A fuller sample kernel log is below:

[99013.597181] CPU 0 Unable to handle kernel paging request at virtual address c0001000, epc == 804c9be0, ra == 8df04e24
[99013.598945] Oops[#1]:
[99013.599331] CPU: 0 PID: 32582 Comm: wget Not tainted 4.14.89 #0
[99013.599785] task: 8d8aa700 task.stack: 8de90000
[99013.600081] $ 0   : 00000000 00000001 d9f5a4de 00000000
[99013.600595] $ 4   : 8e208610 c0001000 8e208610 44014001
[99013.600880] $ 8   : 00000001 00000000 0000000a ff000000
[99013.601168] $12   : 00000000 00000001 805e837c 68756275
[99013.601450] $16   : 8de9f800 8f89d900 8de9f874 ffffffff
[99013.601763] $20   : 00000001 00000022 00000000 00000001
[99013.602050] $24   : 00000018 8d86a850
[99013.602411] $28   : 8de90000 8de91a90 f0000000 8df04e24
[99013.602754] Hi    : 00000f47
[99013.602926] Lo    : 563bd000
[99013.603503] epc   : 804c9be0 ip_send_check+0x48/0x80
[99013.604123] ra    : 8df04e24 0x8df04e24
[99013.604346] Status: 1000a403 KERNEL EXL IE
[99013.604702] Cause : 00800008 (ExcCode 02)
[99013.604926] BadVA : c0001000
[99013.605103] PrId  : 00019300 (MIPS 24Kc)
[99013.605317] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mac80211_hwsim mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY slhc pcnet32 nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_netlink iptable_raw iptable_mangle iptable_filter ipt_ECN ip_tables crc_ccitt compat sch_cake act_simple em_nbyte sch_dsmark sch_prio act_gact act_pedit sch_pie
[99013.609019]  em_meta sch_gred sch_teql sch_multiq act_csum libcrc32c act_ipt em_text sch_codel sch_sfq act_police sch_fq em_cmp sch_red em_ipset act_bpf cls_bpf act_connmark nf_conntrack cls_matchall act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw cls_basic sch_tbf sch_htb sch_hfsc sch_ingress xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables ifb mii
[99013.612387] Process wget (pid: 32582, threadinfo=8de90000, task=8d8aa700, tls=77f9fd98)
[99013.612840] Stack : 8e3dbc80 8d8809dc 8d86ad50 7f000001 00000000 8fa20f74 00000000 00000000
[99013.613335]         8de9f800 8f89d900 8de91be8 00000006 00000000 8e165300 00000000 00000001
[99013.613797]         f0000000 804b2920 00000000 00000000 c4991101 a1338f42 8e165300 00000020
[99013.614248]         8e165380 8f89d900 8e1653fc 0000000e 00000000 00000000 8de91be8 806d644c
[99013.614740]         00000000 8dfb0898 00000000 8de9fb00 8f89d900 804b2920 00000000 00000000
[99013.615183]         ...
[99013.615413] Call Trace:
[99013.615575] [<804c9be0>] ip_send_check+0x48/0x80
[99013.616176] [<8df04e24>] 0x8df04e24
[99013.616474] Code: 24850010  00863021  00481021 <8ca30000> 24a50004  00621021  0043182b  14c5fffb  00431021
[99013.617166]
[99013.617606] ---[ end trace b61fa7c533c1775c ]---
[99013.620786] Kernel panic - not syncing: Fatal exception in interrupt
[99013.622415] Rebooting in 3 seconds..
[99017.654903] Reboot failed -- System halted

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
uosbox referenced this pull request Apr 23, 2019
Fix crash due to passing invalid r2x00dev->eeprom_file pointer to
release_firmware(). Since we copy eeprom data with EEPROM_SIZE
in rt2800_read_eeprom() we can use eeprom_file->size as marker
if the file was crated by request_firmware().

Acked-by: Kristian Evensen <kristian.evensen@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
friendlyarm referenced this pull request in friendlyarm/friendlywrt Apr 25, 2019
plappermaul added a commit to plappermaul/openwrt that referenced this pull request Aug 15, 2025
Booting Realtek switches via TFTP will have a chance of ~5% to
fail with the following dump on SMP devices. Sample taken from
RTL931x.

[    1.318320] rtl931x_chip_init: init ENCAP done
[    1.323360] rtl931x_chip_init: init MIB done
[    1.328337] rtl931x_chip_init: init ACL done
[    1.333219] rtl931x_chip_init: init ALE done
[    1.344307] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 806c5c4c
[    1.356418] Oops[openwrt#1]:
[    1.359067] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.40 #0
[    1.366582] Hardware name: Linksys LGS352C
[    1.371226] $ 0   : 00000000 00000001 00000000 80b6cc44
[    1.377179] $ 4   : 836b0540 00000000 00000000 83011d38
[    1.383119] $ 8   : 00000000 ffffefff 00000001 80b08c08
[    1.389071] $12   : ffffffea 83011d34 0000007 00000558
[    1.395060] $16   : 836b0540 00000000 00000100 83011ebf
[    1.401003] $20   : 83011ec0 83011ec8 ffff8b3c 80b00000
[    1.406984] $24   : 00000000 80b08c38
[    1.412922] $28   : 83038000 83011e70 82fb37a0 806c5c4c
[    1.418888] Hi    : 0000014b
[    1.422201] Lo    : c74d8000
[    1.425490] epc   : 00000000 0x0
[    1.429191] ra    : 806c5c4c __napi_poll+0x4c/0x208
[    1.434728] Status: 11000403 KERNEL EXL IE
[    1.439497] Cause : 50800008 (ExcCode 02)
[    1.444040] BadVA : 00000000
[    1.447330] PrId  : 0001a120 (MIPS interAptiv (multi))
[    1.453157] Modules linked in:
[    1.456641] Process swapper/0 (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
[    1.465742] Stack : 82faf248 80a8d558 817ed500 ffff8b3a 836b0540 8066a348 82fb2bc0 836b0540
[    1.475209]         82fb3600 00000100 0000012c 806c6274 00000000 00000017 00000002 80196134
[    1.484701]         80b00000 83011ed0 83011eb8 83011e00 83011ec0 83011ec0 83011ec8 83011ec8
[    1.494233]         00000001 81920000 81920000 80aefe4c 836b0000 00000000 00000000 00000001
[    1.503686]         00000100 00000000 83011f20 80aefde0 00000000 8019ac14 80b01550 00000000
[    1.513144]         ...
[    1.515957] Call Trace:
[    1.515996]
[    1.520458] [<8066a348>] rtl93xx_net_irq+0x1a4/0x1ac
[    1.526116] [<806c6274>] net_rx_action+0x18c/0x360
[    1.531576] [<80196134>] __handle_irq_event_percpu+0x58/0x16c
[    1.538111] [<8019ac14>] handle_level_irq+0x1e0/0x1f4
[    1.543870] [<80133588>] handle_softirqs+0x14c/0x2ec
[    1.549488] [<801339e4>] irq_exit+0x84/0xb4
[    1.554183] [<805527dc>] plat_irq_dispatch+0x90/0xdc
[    1.559764] [<801019f0>] except_vec_vi_end+0xc4/0xd0
[    1.565337]

An network interrupt may be received before the device is setup
properly. In this case NAPI structures are missing and __napi_poll()
will find a NULL pointer in n->poll. Avoid this by registering the
device after initialization is complete.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
plappermaul added a commit to plappermaul/openwrt that referenced this pull request Aug 15, 2025
Booting Realtek switches via TFTP will have a chance of ~5% to
fail with the following dump on SMP devices. Sample taken from
RTL931x.

[    1.318320] rtl931x_chip_init: init ENCAP done
[    1.323360] rtl931x_chip_init: init MIB done
[    1.328337] rtl931x_chip_init: init ACL done
[    1.333219] rtl931x_chip_init: init ALE done
[    1.344307] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 806c5c4c
[    1.356418] Oops[openwrt#1]:
[    1.359067] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.40 #0
[    1.366582] Hardware name: Linksys LGS352C
[    1.371226] $ 0   : 00000000 00000001 00000000 80b6cc44
[    1.377179] $ 4   : 836b0540 00000000 00000000 83011d38
[    1.383119] $ 8   : 00000000 ffffefff 00000001 80b08c08
[    1.389071] $12   : ffffffea 83011d34 0000007 00000558
[    1.395060] $16   : 836b0540 00000000 00000100 83011ebf
[    1.401003] $20   : 83011ec0 83011ec8 ffff8b3c 80b00000
[    1.406984] $24   : 00000000 80b08c38
[    1.412922] $28   : 83038000 83011e70 82fb37a0 806c5c4c
[    1.418888] Hi    : 0000014b
[    1.422201] Lo    : c74d8000
[    1.425490] epc   : 00000000 0x0
[    1.429191] ra    : 806c5c4c __napi_poll+0x4c/0x208
[    1.434728] Status: 11000403 KERNEL EXL IE
[    1.439497] Cause : 50800008 (ExcCode 02)
[    1.444040] BadVA : 00000000
[    1.447330] PrId  : 0001a120 (MIPS interAptiv (multi))
[    1.453157] Modules linked in:
[    1.456641] Process swapper/0 (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
[    1.465742] Stack : 82faf248 80a8d558 817ed500 ffff8b3a 836b0540 8066a348 82fb2bc0 836b0540
[    1.475209]         82fb3600 00000100 0000012c 806c6274 00000000 00000017 00000002 80196134
[    1.484701]         80b00000 83011ed0 83011eb8 83011e00 83011ec0 83011ec0 83011ec8 83011ec8
[    1.494233]         00000001 81920000 81920000 80aefe4c 836b0000 00000000 00000000 00000001
[    1.503686]         00000100 00000000 83011f20 80aefde0 00000000 8019ac14 80b01550 00000000
[    1.513144]         ...
[    1.515957] Call Trace:
[    1.515996]
[    1.520458] [<8066a348>] rtl93xx_net_irq+0x1a4/0x1ac
[    1.526116] [<806c6274>] net_rx_action+0x18c/0x360
[    1.531576] [<80196134>] __handle_irq_event_percpu+0x58/0x16c
[    1.538111] [<8019ac14>] handle_level_irq+0x1e0/0x1f4
[    1.543870] [<80133588>] handle_softirqs+0x14c/0x2ec
[    1.549488] [<801339e4>] irq_exit+0x84/0xb4
[    1.554183] [<805527dc>] plat_irq_dispatch+0x90/0xdc
[    1.559764] [<801019f0>] except_vec_vi_end+0xc4/0xd0
[    1.565337]

A network interrupt may be received before the device is setup
properly. In this case NAPI structures are missing and __napi_poll()
will find a NULL pointer in n->poll. Avoid this by registering the
device after initialization is complete.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
KGeri201 pushed a commit to KGeri201/openwrt that referenced this pull request Aug 17, 2025
Add missing function reference for the l2_hash_seed call in rtl931x_reg
in the rtl83xx DSA driver part.
While at it, rename the referenced function to proper naming convention
and simplify its content.

The missing reference causes a hard crash after a short time (on
MS510TXM) because the driver assumes the reference always exists.

[  111.785559] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 805469a0
[  111.800991] Oops[openwrt#1]:
[  111.801026] CPU: 0 PID: 11 Comm: kworker/u8:0 Tainted: G           O       6.12.33 #0
[  111.801046] Workqueue: dsa_ordered dsa_slave_switchdev_event_work
...
[  111.880600] epc   : 00000000 0x0
[  111.884219] ra    : 805469a0 rtl83xx_port_fdb_add+0x7c/0x204
[  111.890570] Status: 11000403 KERNEL EXL IE
[  111.895263] Cause : 50800008 (ExcCode 02)
[  111.899731] BadVA : 00000000
[  111.902946] PrId  : 0001a120 (MIPS interAptiv (multi))
[  111.956086] Process kworker/u8:0 (pid: 11, threadinfo=0b107c25, task=265aeb31, tls=00000000)
...
[  112.015167] Call Trace:
[  112.019549] [<80170b04>] load_balance+0x494/0x708
[  112.025022] [<807bb368>] dsa_port_do_fdb_add+0x24c/0x340
[  112.031048] [<807bc868>] dsa_switch_event+0xd44/0x13cc
[  112.036845] [<8015867c>] raw_notifier_call_chain+0x48/0x88
[  112.043031] [<807bcf3c>] dsa_tree_notify+0x10/0x3c
[  112.048395] [<807b2a64>] dsa_port_bridge_host_fdb_add+0x15c/0x190
[  112.055459] [<807b4e40>] dsa_slave_switchdev_event_work+0x164/0x1cc
...

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: openwrt#19170
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
KGeri201 pushed a commit to KGeri201/openwrt that referenced this pull request Aug 17, 2025
The ix4-200d is a 4 bay NAS supported since OpenWrt 23.05. Drive trays
controller. Due to a kernel-related issue with the SATA controller,
trays openwrt#1 and openwrt#2 were not recognized. This issue has been fixed in
kernel 6.10, so with the adoption of kernel 6.12 in the Kirkwood
target trays openwrt#1 and openwrt#2 can now be made accessible. This requires the
kmod-ata-ahci package, which this commit adds as default to the
makefile.

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
Link: openwrt#19435
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
hauke pushed a commit to plappermaul/openwrt that referenced this pull request Aug 17, 2025
Booting Realtek switches via TFTP will have a chance of ~5% to
fail with the following dump on SMP devices. Sample taken from
RTL931x.

[    1.318320] rtl931x_chip_init: init ENCAP done
[    1.323360] rtl931x_chip_init: init MIB done
[    1.328337] rtl931x_chip_init: init ACL done
[    1.333219] rtl931x_chip_init: init ALE done
[    1.344307] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 806c5c4c
[    1.356418] Oops[openwrt#1]:
[    1.359067] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.40 #0
[    1.366582] Hardware name: Linksys LGS352C
[    1.371226] $ 0   : 00000000 00000001 00000000 80b6cc44
[    1.377179] $ 4   : 836b0540 00000000 00000000 83011d38
[    1.383119] $ 8   : 00000000 ffffefff 00000001 80b08c08
[    1.389071] $12   : ffffffea 83011d34 0000007 00000558
[    1.395060] $16   : 836b0540 00000000 00000100 83011ebf
[    1.401003] $20   : 83011ec0 83011ec8 ffff8b3c 80b00000
[    1.406984] $24   : 00000000 80b08c38
[    1.412922] $28   : 83038000 83011e70 82fb37a0 806c5c4c
[    1.418888] Hi    : 0000014b
[    1.422201] Lo    : c74d8000
[    1.425490] epc   : 00000000 0x0
[    1.429191] ra    : 806c5c4c __napi_poll+0x4c/0x208
[    1.434728] Status: 11000403 KERNEL EXL IE
[    1.439497] Cause : 50800008 (ExcCode 02)
[    1.444040] BadVA : 00000000
[    1.447330] PrId  : 0001a120 (MIPS interAptiv (multi))
[    1.453157] Modules linked in:
[    1.456641] Process swapper/0 (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
[    1.465742] Stack : 82faf248 80a8d558 817ed500 ffff8b3a 836b0540 8066a348 82fb2bc0 836b0540
[    1.475209]         82fb3600 00000100 0000012c 806c6274 00000000 00000017 00000002 80196134
[    1.484701]         80b00000 83011ed0 83011eb8 83011e00 83011ec0 83011ec0 83011ec8 83011ec8
[    1.494233]         00000001 81920000 81920000 80aefe4c 836b0000 00000000 00000000 00000001
[    1.503686]         00000100 00000000 83011f20 80aefde0 00000000 8019ac14 80b01550 00000000
[    1.513144]         ...
[    1.515957] Call Trace:
[    1.515996]
[    1.520458] [<8066a348>] rtl93xx_net_irq+0x1a4/0x1ac
[    1.526116] [<806c6274>] net_rx_action+0x18c/0x360
[    1.531576] [<80196134>] __handle_irq_event_percpu+0x58/0x16c
[    1.538111] [<8019ac14>] handle_level_irq+0x1e0/0x1f4
[    1.543870] [<80133588>] handle_softirqs+0x14c/0x2ec
[    1.549488] [<801339e4>] irq_exit+0x84/0xb4
[    1.554183] [<805527dc>] plat_irq_dispatch+0x90/0xdc
[    1.559764] [<801019f0>] except_vec_vi_end+0xc4/0xd0
[    1.565337]

A network interrupt may be received before the device is setup
properly. In this case NAPI structures are missing and __napi_poll()
will find a NULL pointer in n->poll. Avoid this by registering the
device after initialization is complete.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: openwrt#19787
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
joelinux60 pushed a commit to joelinux60/openwrt-joelinux60 that referenced this pull request Aug 17, 2025
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with openwrt#1 and openwrt#2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 23, 2025
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with openwrt#1 and openwrt#2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 23, 2025
This patch adds missing `num_vdev_peers` attribute that was
introduced in `207-ath11k-Enable-256_512MB-profiles.patch`

qcn9074 hw1.0
qcn6122 hw1.0
qca6390 hw2.0
wcn6750 hw1.0

Fixes the NULL pointer dereference error:

```
Internal error: Oops: 96000005 [openwrt#1] PREEMPT SMP
CPU: 0 PID: 40 Comm: kworker/u4:2 Tainted: G O 6.6.87 #0
Hardware name: Xunison D50 5G (DT)
Workqueue: ath11k_qmi_driver_event ath11k_qmi_deinit_service [ath11k]
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)

PC is at ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
LR is at ath11k_dbring_buf_cleanup+0xd34/0x10ec [ath11k]

Call trace:
  ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
  ath11k_wmi_cmd_init+0x64/0x55c [ath11k]
  ath11k_core_qmi_firmware_ready+0x190/0x5b4 [ath11k]
  ath11k_qmi_deinit_service+0x1224/0x1ac4 [ath11k]
  process_one_work+0x184/0x2e0
  worker_thread+0x360/0x484
  kthread+0x10c/0x110
  ret_from_fork+0x10/0x20
```

TODO: remove once 207-ath11k-Enable-256_512MB-profiles.patch is deleted

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 23, 2025
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with openwrt#1 and openwrt#2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 23, 2025
This patch adds missing `num_vdev_peers` attribute that was
introduced in `207-ath11k-Enable-256_512MB-profiles.patch`

qcn9074 hw1.0
qcn6122 hw1.0
qca6390 hw2.0
wcn6750 hw1.0

Fixes the NULL pointer dereference error:

```
Internal error: Oops: 96000005 [openwrt#1] PREEMPT SMP
CPU: 0 PID: 40 Comm: kworker/u4:2 Tainted: G O 6.6.87 #0
Hardware name: Xunison D50 5G (DT)
Workqueue: ath11k_qmi_driver_event ath11k_qmi_deinit_service [ath11k]
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)

PC is at ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
LR is at ath11k_dbring_buf_cleanup+0xd34/0x10ec [ath11k]

Call trace:
  ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
  ath11k_wmi_cmd_init+0x64/0x55c [ath11k]
  ath11k_core_qmi_firmware_ready+0x190/0x5b4 [ath11k]
  ath11k_qmi_deinit_service+0x1224/0x1ac4 [ath11k]
  process_one_work+0x184/0x2e0
  worker_thread+0x360/0x484
  kthread+0x10c/0x110
  ret_from_fork+0x10/0x20
```

TODO: remove once 207-ath11k-Enable-256_512MB-profiles.patch is deleted

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 23, 2025
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with openwrt#1 and openwrt#2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 23, 2025
This patch adds missing `num_vdev_peers` attribute that was
introduced in `207-ath11k-Enable-256_512MB-profiles.patch`

qcn9074 hw1.0
qcn6122 hw1.0
qca6390 hw2.0
wcn6750 hw1.0

Fixes the NULL pointer dereference error:

```
Internal error: Oops: 96000005 [openwrt#1] PREEMPT SMP
CPU: 0 PID: 40 Comm: kworker/u4:2 Tainted: G O 6.6.87 #0
Hardware name: Xunison D50 5G (DT)
Workqueue: ath11k_qmi_driver_event ath11k_qmi_deinit_service [ath11k]
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)

PC is at ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
LR is at ath11k_dbring_buf_cleanup+0xd34/0x10ec [ath11k]

Call trace:
  ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
  ath11k_wmi_cmd_init+0x64/0x55c [ath11k]
  ath11k_core_qmi_firmware_ready+0x190/0x5b4 [ath11k]
  ath11k_qmi_deinit_service+0x1224/0x1ac4 [ath11k]
  process_one_work+0x184/0x2e0
  worker_thread+0x360/0x484
  kthread+0x10c/0x110
  ret_from_fork+0x10/0x20
```

TODO: remove once 207-ath11k-Enable-256_512MB-profiles.patch is deleted

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 23, 2025
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with openwrt#1 and openwrt#2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 23, 2025
This patch adds missing `num_vdev_peers` attribute that was
introduced in `207-ath11k-Enable-256_512MB-profiles.patch`

qcn9074 hw1.0
qcn6122 hw1.0
qca6390 hw2.0
wcn6750 hw1.0

Fixes the NULL pointer dereference error:

```
Internal error: Oops: 96000005 [openwrt#1] PREEMPT SMP
CPU: 0 PID: 40 Comm: kworker/u4:2 Tainted: G O 6.6.87 #0
Hardware name: Xunison D50 5G (DT)
Workqueue: ath11k_qmi_driver_event ath11k_qmi_deinit_service [ath11k]
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)

PC is at ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
LR is at ath11k_dbring_buf_cleanup+0xd34/0x10ec [ath11k]

Call trace:
  ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
  ath11k_wmi_cmd_init+0x64/0x55c [ath11k]
  ath11k_core_qmi_firmware_ready+0x190/0x5b4 [ath11k]
  ath11k_qmi_deinit_service+0x1224/0x1ac4 [ath11k]
  process_one_work+0x184/0x2e0
  worker_thread+0x360/0x484
  kthread+0x10c/0x110
  ret_from_fork+0x10/0x20
```

TODO: remove once 207-ath11k-Enable-256_512MB-profiles.patch is deleted

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 24, 2025
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with openwrt#1 and openwrt#2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 24, 2025
This patch adds missing `num_vdev_peers` attribute that was
introduced in `207-ath11k-Enable-256_512MB-profiles.patch`

qcn9074 hw1.0
qcn6122 hw1.0
qca6390 hw2.0
wcn6750 hw1.0

Fixes the NULL pointer dereference error:

```
Internal error: Oops: 96000005 [openwrt#1] PREEMPT SMP
CPU: 0 PID: 40 Comm: kworker/u4:2 Tainted: G O 6.6.87 #0
Hardware name: Xunison D50 5G (DT)
Workqueue: ath11k_qmi_driver_event ath11k_qmi_deinit_service [ath11k]
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)

PC is at ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
LR is at ath11k_dbring_buf_cleanup+0xd34/0x10ec [ath11k]

Call trace:
  ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
  ath11k_wmi_cmd_init+0x64/0x55c [ath11k]
  ath11k_core_qmi_firmware_ready+0x190/0x5b4 [ath11k]
  ath11k_qmi_deinit_service+0x1224/0x1ac4 [ath11k]
  process_one_work+0x184/0x2e0
  worker_thread+0x360/0x484
  kthread+0x10c/0x110
  ret_from_fork+0x10/0x20
```

TODO: remove once 207-ath11k-Enable-256_512MB-profiles.patch is deleted

Signed-off-by: Sean Khan <datapronix@protonmail.com>
igor-dyatlov referenced this pull request in igor-dyatlov/openwrt Aug 26, 2025
Booting Realtek switches via TFTP will have a chance of ~5% to
fail with the following dump on SMP devices. Sample taken from
RTL931x.

[    1.318320] rtl931x_chip_init: init ENCAP done
[    1.323360] rtl931x_chip_init: init MIB done
[    1.328337] rtl931x_chip_init: init ACL done
[    1.333219] rtl931x_chip_init: init ALE done
[    1.344307] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 806c5c4c
[    1.356418] Oops[#1]:
[    1.359067] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.40 #0
[    1.366582] Hardware name: Linksys LGS352C
[    1.371226] $ 0   : 00000000 00000001 00000000 80b6cc44
[    1.377179] $ 4   : 836b0540 00000000 00000000 83011d38
[    1.383119] $ 8   : 00000000 ffffefff 00000001 80b08c08
[    1.389071] $12   : ffffffea 83011d34 0000007 00000558
[    1.395060] $16   : 836b0540 00000000 00000100 83011ebf
[    1.401003] $20   : 83011ec0 83011ec8 ffff8b3c 80b00000
[    1.406984] $24   : 00000000 80b08c38
[    1.412922] $28   : 83038000 83011e70 82fb37a0 806c5c4c
[    1.418888] Hi    : 0000014b
[    1.422201] Lo    : c74d8000
[    1.425490] epc   : 00000000 0x0
[    1.429191] ra    : 806c5c4c __napi_poll+0x4c/0x208
[    1.434728] Status: 11000403 KERNEL EXL IE
[    1.439497] Cause : 50800008 (ExcCode 02)
[    1.444040] BadVA : 00000000
[    1.447330] PrId  : 0001a120 (MIPS interAptiv (multi))
[    1.453157] Modules linked in:
[    1.456641] Process swapper/0 (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
[    1.465742] Stack : 82faf248 80a8d558 817ed500 ffff8b3a 836b0540 8066a348 82fb2bc0 836b0540
[    1.475209]         82fb3600 00000100 0000012c 806c6274 00000000 00000017 00000002 80196134
[    1.484701]         80b00000 83011ed0 83011eb8 83011e00 83011ec0 83011ec0 83011ec8 83011ec8
[    1.494233]         00000001 81920000 81920000 80aefe4c 836b0000 00000000 00000000 00000001
[    1.503686]         00000100 00000000 83011f20 80aefde0 00000000 8019ac14 80b01550 00000000
[    1.513144]         ...
[    1.515957] Call Trace:
[    1.515996]
[    1.520458] [<8066a348>] rtl93xx_net_irq+0x1a4/0x1ac
[    1.526116] [<806c6274>] net_rx_action+0x18c/0x360
[    1.531576] [<80196134>] __handle_irq_event_percpu+0x58/0x16c
[    1.538111] [<8019ac14>] handle_level_irq+0x1e0/0x1f4
[    1.543870] [<80133588>] handle_softirqs+0x14c/0x2ec
[    1.549488] [<801339e4>] irq_exit+0x84/0xb4
[    1.554183] [<805527dc>] plat_irq_dispatch+0x90/0xdc
[    1.559764] [<801019f0>] except_vec_vi_end+0xc4/0xd0
[    1.565337]

A network interrupt may be received before the device is setup
properly. In this case NAPI structures are missing and __napi_poll()
will find a NULL pointer in n->poll. Avoid this by registering the
device after initialization is complete.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: openwrt#19787
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
jackyaway pushed a commit to jackyaway/openwrt that referenced this pull request Aug 27, 2025
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with openwrt#1 and openwrt#2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
jackyaway pushed a commit to jackyaway/openwrt that referenced this pull request Aug 27, 2025
This patch adds missing `num_vdev_peers` attribute that was
introduced in `207-ath11k-Enable-256_512MB-profiles.patch`

qcn9074 hw1.0
qcn6122 hw1.0
qca6390 hw2.0
wcn6750 hw1.0

Fixes the NULL pointer dereference error:

```
Internal error: Oops: 96000005 [openwrt#1] PREEMPT SMP
CPU: 0 PID: 40 Comm: kworker/u4:2 Tainted: G O 6.6.87 #0
Hardware name: Xunison D50 5G (DT)
Workqueue: ath11k_qmi_driver_event ath11k_qmi_deinit_service [ath11k]
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)

PC is at ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
LR is at ath11k_dbring_buf_cleanup+0xd34/0x10ec [ath11k]

Call trace:
  ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
  ath11k_wmi_cmd_init+0x64/0x55c [ath11k]
  ath11k_core_qmi_firmware_ready+0x190/0x5b4 [ath11k]
  ath11k_qmi_deinit_service+0x1224/0x1ac4 [ath11k]
  process_one_work+0x184/0x2e0
  worker_thread+0x360/0x484
  kthread+0x10c/0x110
  ret_from_fork+0x10/0x20
```

TODO: remove once 207-ath11k-Enable-256_512MB-profiles.patch is deleted

Signed-off-by: Sean Khan <datapronix@protonmail.com>
jackyaway pushed a commit to jackyaway/openwrt that referenced this pull request Aug 27, 2025
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with openwrt#1 and openwrt#2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
jackyaway pushed a commit to jackyaway/openwrt that referenced this pull request Aug 27, 2025
This patch adds missing `num_vdev_peers` attribute that was
introduced in `207-ath11k-Enable-256_512MB-profiles.patch`

qcn9074 hw1.0
qcn6122 hw1.0
qca6390 hw2.0
wcn6750 hw1.0

Fixes the NULL pointer dereference error:

```
Internal error: Oops: 96000005 [openwrt#1] PREEMPT SMP
CPU: 0 PID: 40 Comm: kworker/u4:2 Tainted: G O 6.6.87 #0
Hardware name: Xunison D50 5G (DT)
Workqueue: ath11k_qmi_driver_event ath11k_qmi_deinit_service [ath11k]
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)

PC is at ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
LR is at ath11k_dbring_buf_cleanup+0xd34/0x10ec [ath11k]

Call trace:
  ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
  ath11k_wmi_cmd_init+0x64/0x55c [ath11k]
  ath11k_core_qmi_firmware_ready+0x190/0x5b4 [ath11k]
  ath11k_qmi_deinit_service+0x1224/0x1ac4 [ath11k]
  process_one_work+0x184/0x2e0
  worker_thread+0x360/0x484
  kthread+0x10c/0x110
  ret_from_fork+0x10/0x20
```

TODO: remove once 207-ath11k-Enable-256_512MB-profiles.patch is deleted

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 28, 2025
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with openwrt#1 and openwrt#2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 28, 2025
This patch adds missing `num_vdev_peers` attribute that was
introduced in `207-ath11k-Enable-256_512MB-profiles.patch`

qcn9074 hw1.0
qcn6122 hw1.0
qca6390 hw2.0
wcn6750 hw1.0

Fixes the NULL pointer dereference error:

```
Internal error: Oops: 96000005 [openwrt#1] PREEMPT SMP
CPU: 0 PID: 40 Comm: kworker/u4:2 Tainted: G O 6.6.87 #0
Hardware name: Xunison D50 5G (DT)
Workqueue: ath11k_qmi_driver_event ath11k_qmi_deinit_service [ath11k]
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)

PC is at ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
LR is at ath11k_dbring_buf_cleanup+0xd34/0x10ec [ath11k]

Call trace:
  ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
  ath11k_wmi_cmd_init+0x64/0x55c [ath11k]
  ath11k_core_qmi_firmware_ready+0x190/0x5b4 [ath11k]
  ath11k_qmi_deinit_service+0x1224/0x1ac4 [ath11k]
  process_one_work+0x184/0x2e0
  worker_thread+0x360/0x484
  kthread+0x10c/0x110
  ret_from_fork+0x10/0x20
```

TODO: remove once 207-ath11k-Enable-256_512MB-profiles.patch is deleted

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 28, 2025
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with openwrt#1 and openwrt#2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
pwned-pixel pushed a commit to pwned-pixel/openwrt that referenced this pull request Aug 28, 2025
This patch adds missing `num_vdev_peers` attribute that was
introduced in `207-ath11k-Enable-256_512MB-profiles.patch`

qcn9074 hw1.0
qcn6122 hw1.0
qca6390 hw2.0
wcn6750 hw1.0

Fixes the NULL pointer dereference error:

```
Internal error: Oops: 96000005 [openwrt#1] PREEMPT SMP
CPU: 0 PID: 40 Comm: kworker/u4:2 Tainted: G O 6.6.87 #0
Hardware name: Xunison D50 5G (DT)
Workqueue: ath11k_qmi_driver_event ath11k_qmi_deinit_service [ath11k]
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)

PC is at ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
LR is at ath11k_dbring_buf_cleanup+0xd34/0x10ec [ath11k]

Call trace:
  ath11k_dbring_buf_cleanup+0xd48/0x10ec [ath11k]
  ath11k_wmi_cmd_init+0x64/0x55c [ath11k]
  ath11k_core_qmi_firmware_ready+0x190/0x5b4 [ath11k]
  ath11k_qmi_deinit_service+0x1224/0x1ac4 [ath11k]
  process_one_work+0x184/0x2e0
  worker_thread+0x360/0x484
  kthread+0x10c/0x110
  ret_from_fork+0x10/0x20
```

TODO: remove once 207-ath11k-Enable-256_512MB-profiles.patch is deleted

Signed-off-by: Sean Khan <datapronix@protonmail.com>
plappermaul added a commit to plappermaul/openwrt that referenced this pull request Sep 5, 2025
The receive path of the RTL93xx SoCs is currently discarding packets
in software. Analysis gives the following explanation:

- RX ring size registers are setup with the full software ring size
- When packets are received the packet counter registers are increased
- After RX processing the counter registers are changed the wrong way
- From then SOC is allowed to receive more packets than software allows
- Overflow interrupts are fired
- As a reaction to that the software drops packets

Change the processing as follows:

- Setup ring size registers with a headroom of 2 buffers
- Decrease the counter registers with the real work done

With this change no more overflow interrupts occur because the SoC
disables the queues before they can overflow or hit a buffer that is
still owned by the CPU.

iperf3 run before

-----------------------------------------------------------
Server listening on 5201 (test openwrt#1)
-----------------------------------------------------------
Accepted connection from 192.168.2.86, port 54412
[  5] local 192.168.2.71 port 5201 connected to 192.168.2.86 port 54418
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   384 KBytes  3.14 Mbits/sec
[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   3.00-4.01   sec  5.12 MBytes  42.8 Mbits/sec
[  5]   4.01-5.00   sec  11.4 MBytes  95.8 Mbits/sec
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec

iperf3 run after

-----------------------------------------------------------
Server listening on 5201 (test openwrt#1)
-----------------------------------------------------------
Accepted connection from 192.168.2.86, port 55228
[  5] local 192.168.2.71 port 5201 connected to 192.168.2.86 port 55232
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  22.8 MBytes   191 Mbits/sec
[  5]   1.00-2.01   sec  25.4 MBytes   211 Mbits/sec
[  5]   2.01-3.00   sec  25.4 MBytes   215 Mbits/sec
[  5]   3.00-4.01   sec  26.5 MBytes   220 Mbits/sec
[  5]   4.01-5.00   sec  26.2 MBytes   222 Mbits/sec
[  5]   5.00-6.00   sec  26.9 MBytes   225 Mbits/sec
[  5]   6.00-7.00   sec  27.0 MBytes   226 Mbits/sec
[  5]   7.00-8.01   sec  26.9 MBytes   224 Mbits/sec
[  5]   8.01-9.00   sec  26.5 MBytes   223 Mbits/sec
[  5]   9.00-10.00  sec  26.8 MBytes   225 Mbits/sec
[  5]  10.00-10.02  sec   640 KBytes   224 Mbits/sec

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
plappermaul added a commit to plappermaul/openwrt that referenced this pull request Sep 5, 2025
The receive path of the RTL93xx SoCs is currently discarding packets
in software. Analysis gives the following explanation:

- RX ring size registers are setup with the full software ring size
- When packets are received the packet counter registers are increased
- After RX processing the counter registers are changed the wrong way
- From then SOC is allowed to receive more packets than software allows
- Overflow interrupts are fired
- As a reaction to that the software drops packets

Change the processing as follows:

- Setup ring size registers with a headroom of 2 buffers
- Decrease the counter registers with the real work done

With this change no more overflow interrupts occur because the SoC
disables the queues before they can overflow or hit a buffer that is
still owned by the CPU.

iperf3 run before

-----------------------------------------------------------
Server listening on 5201 (test openwrt#1)
-----------------------------------------------------------
Accepted connection from 192.168.2.86, port 54412
[  5] local 192.168.2.71 port 5201 connected to 192.168.2.86 port 54418
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   384 KBytes  3.14 Mbits/sec
[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   3.00-4.01   sec  5.12 MBytes  42.8 Mbits/sec
[  5]   4.01-5.00   sec  11.4 MBytes  95.8 Mbits/sec
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec

iperf3 run after

-----------------------------------------------------------
Server listening on 5201 (test openwrt#1)
-----------------------------------------------------------
Accepted connection from 192.168.2.86, port 55228
[  5] local 192.168.2.71 port 5201 connected to 192.168.2.86 port 55232
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  22.8 MBytes   191 Mbits/sec
[  5]   1.00-2.01   sec  25.4 MBytes   211 Mbits/sec
[  5]   2.01-3.00   sec  25.4 MBytes   215 Mbits/sec
[  5]   3.00-4.01   sec  26.5 MBytes   220 Mbits/sec
[  5]   4.01-5.00   sec  26.2 MBytes   222 Mbits/sec
[  5]   5.00-6.00   sec  26.9 MBytes   225 Mbits/sec
[  5]   6.00-7.00   sec  27.0 MBytes   226 Mbits/sec
[  5]   7.00-8.01   sec  26.9 MBytes   224 Mbits/sec
[  5]   8.01-9.00   sec  26.5 MBytes   223 Mbits/sec
[  5]   9.00-10.00  sec  26.8 MBytes   225 Mbits/sec
[  5]  10.00-10.02  sec   640 KBytes   224 Mbits/sec

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
plappermaul added a commit to plappermaul/openwrt that referenced this pull request Sep 5, 2025
The receive path of the RTL93xx SoCs is currently discarding packets
in software. Analysis gives the following explanation:

- RX ring size registers are setup with the full software ring size
- When packets are received the packet counter registers are increased
- After RX processing the counter registers are changed the wrong way
- From then SOC is allowed to receive more packets than software allows
- Overflow interrupts are fired
- As a reaction to that the software drops packets

Change the processing as follows:

- Setup ring size registers with a headroom of 2 buffers
- Decrease the counter registers with the real work done

With this change no more overflow interrupts occur because the SoC
disables the queues before they can overflow or hit a buffer that is
still owned by the CPU.

Benchmark from single stream iperf3 run, with server process running
on ZyXEL XGS1210 (RTL930x).

iperf3 run before

-----------------------------------------------------------
Server listening on 5201 (test openwrt#1)
-----------------------------------------------------------
Accepted connection from 192.168.2.86, port 54412
[  5] local 192.168.2.71 port 5201 connected to 192.168.2.86 port 54418
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   384 KBytes  3.14 Mbits/sec
[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   3.00-4.01   sec  5.12 MBytes  42.8 Mbits/sec
[  5]   4.01-5.00   sec  11.4 MBytes  95.8 Mbits/sec
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec

iperf3 run after

-----------------------------------------------------------
Server listening on 5201 (test openwrt#1)
-----------------------------------------------------------
Accepted connection from 192.168.2.86, port 55228
[  5] local 192.168.2.71 port 5201 connected to 192.168.2.86 port 55232
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  22.8 MBytes   191 Mbits/sec
[  5]   1.00-2.01   sec  25.4 MBytes   211 Mbits/sec
[  5]   2.01-3.00   sec  25.4 MBytes   215 Mbits/sec
[  5]   3.00-4.01   sec  26.5 MBytes   220 Mbits/sec
[  5]   4.01-5.00   sec  26.2 MBytes   222 Mbits/sec
[  5]   5.00-6.00   sec  26.9 MBytes   225 Mbits/sec
[  5]   6.00-7.00   sec  27.0 MBytes   226 Mbits/sec
[  5]   7.00-8.01   sec  26.9 MBytes   224 Mbits/sec
[  5]   8.01-9.00   sec  26.5 MBytes   223 Mbits/sec
[  5]   9.00-10.00  sec  26.8 MBytes   225 Mbits/sec
[  5]  10.00-10.02  sec   640 KBytes   224 Mbits/sec

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
plappermaul added a commit to plappermaul/openwrt that referenced this pull request Sep 5, 2025
The receive path of the RTL93xx SoCs is currently discarding packets
in software. Analysis gives the following explanation:

- RX ring size registers are setup with the full software ring size
- When packets are received the packet counter registers are increased
- After RX processing the counter registers are changed the wrong way
- From then SOC is allowed to receive more packets than software allows
- Overflow interrupts are fired
- As a reaction to that the software drops packets

Change the processing as follows:

- Setup ring size registers with a headroom of 2 buffers
- Decrease the counter registers with the real work done

With this change no more overflow interrupts occur because the SoC
disables the queues before they can overflow or hit a buffer that is
still owned by the CPU.

Benchmark from single stream iperf3 run, with server process running
on ZyXEL XGS1210 (RTL930x).

iperf3 run before

-----------------------------------------------------------
Server listening on 5201 (test openwrt#1)
-----------------------------------------------------------
Accepted connection from 192.168.2.86, port 54412
[  5] local 192.168.2.71 port 5201 connected to 192.168.2.86 port 54418
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   384 KBytes  3.14 Mbits/sec
[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   3.00-4.01   sec  5.12 MBytes  42.8 Mbits/sec
[  5]   4.01-5.00   sec  11.4 MBytes  95.8 Mbits/sec
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec

iperf3 run after

-----------------------------------------------------------
Server listening on 5201 (test openwrt#1)
-----------------------------------------------------------
Accepted connection from 192.168.2.86, port 55228
[  5] local 192.168.2.71 port 5201 connected to 192.168.2.86 port 55232
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  22.8 MBytes   191 Mbits/sec
[  5]   1.00-2.01   sec  25.4 MBytes   211 Mbits/sec
[  5]   2.01-3.00   sec  25.4 MBytes   215 Mbits/sec
[  5]   3.00-4.01   sec  26.5 MBytes   220 Mbits/sec
[  5]   4.01-5.00   sec  26.2 MBytes   222 Mbits/sec
[  5]   5.00-6.00   sec  26.9 MBytes   225 Mbits/sec
[  5]   6.00-7.00   sec  27.0 MBytes   226 Mbits/sec
[  5]   7.00-8.01   sec  26.9 MBytes   224 Mbits/sec
[  5]   8.01-9.00   sec  26.5 MBytes   223 Mbits/sec
[  5]   9.00-10.00  sec  26.8 MBytes   225 Mbits/sec
[  5]  10.00-10.02  sec   640 KBytes   224 Mbits/sec

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants