Qualcommax NSS Build

I have found a way to reproduce the problem without wireguard.

With the commit applied there is a problem with UDP packets between wlan and router but not between wlan and lan

C:\Users\asvio>iperf3 -c 192.168.1.1 -u
Connecting to host 192.168.1.1, port 5201
[  5] local 192.168.1.10 port 63114 connected to 192.168.1.1 port 5201
[ ID] Interval           Transfer     Bitrate         Total Datagrams
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-10.01  sec  1.25 MBytes  1.05 Mbits/sec  0.000 ms  0/906 (0%)  sender
[  5]   0.00-10.01  sec   817 KBytes   669 Kbits/sec  0.099 ms  328/906 (36%)  receiver

C:\Users\asvio>iperf3 -c 192.168.1.2 -u
Connecting to host 192.168.1.2, port 5201
[  5] local 192.168.1.10 port 51846 connected to 192.168.1.2 port 5201
[ ID] Interval           Transfer     Bitrate         Total Datagrams
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-10.01  sec  1.25 MBytes  1.05 Mbits/sec  0.000 ms  0/906 (0%)  sender
[  5]   0.00-10.01  sec  1.25 MBytes  1.05 Mbits/sec  0.057 ms  0/906 (0%)  receiver

Reverting the commit the result is as expected

C:\Users\asvio>iperf3 -c 192.168.1.1 -u
Connecting to host 192.168.1.1, port 5201
[  5] local 192.168.1.10 port 51861 connected to 192.168.1.1 port 5201
[ ID] Interval           Transfer     Bitrate         Total Datagrams
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-10.01  sec  1.25 MBytes  1.05 Mbits/sec  0.000 ms  0/906 (0%)  sender
[  5]   0.00-10.02  sec  1.25 MBytes  1.05 Mbits/sec  0.065 ms  0/906 (0%)  receiver

C:\Users\asvio>iperf3 -c 192.168.1.2 -u
Connecting to host 192.168.1.2, port 5201
[  5] local 192.168.1.10 port 53353 connected to 192.168.1.2 port 5201
[ ID] Interval           Transfer     Bitrate         Total Datagrams
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-10.01  sec  1.25 MBytes  1.05 Mbits/sec  0.000 ms  0/906 (0%)  sender
[  5]   0.00-10.02  sec  1.25 MBytes  1.05 Mbits/sec  0.056 ms  0/906 (0%)  receiver

iperf Done.

C:\Users\asvio>

1 Like

You should be fine as the speed drops to 1 Mbps or lower

@qosmio i discovered the same issue with that patch.

1 Like

This series of commands got my wireguard speeds from 1mb/s to about 400mb/s. Not quite the full 900 prior to NSS but its good enough for me. One question though: why does enabling SQM not work through the LuCI? Has no effect. Same for netem via ssh.

Thanks

Hi!

I need some help to compile qualcommax-6.x-nss-wifi branch for AX9000 International version.
First I get a compile error:

make[3]: Entering directory '/home/mate/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/linux-6.6.52'
  CC [M]  /home/mate/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/ath10k-ct-regular/ath10k-ct-2024.07.30~ac71b14d/ath10k-6.9/mac.o
../ath10k-ct-regular/ath10k-ct-2024.07.30~ac71b14d/ath10k-6.9/mac.c:10562:43: error: initialization of 'int (*)(struct ieee80211_hw *, struct ieee80211_vif *)' from incompatible pointer type 'void (*)(struct ieee80211_hw *, struct ieee80211_vif *)' [-Werror=incompatible-pointer-types]
10562 |         .update_vif_offload             = ath10k_update_vif_offload,
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~
../ath10k-ct-regular/ath10k-ct-2024.07.30~ac71b14d/ath10k-6.9/mac.c:10562:43: note: (near initialization for 'ath10k_ops.update_vif_offload')
cc1: some warnings being treated as errors
make[5]: *** [scripts/Makefile.build:243: /home/mate/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/ath10k-ct-regular/ath10k-ct-2024.07.30~ac71b14d/ath10k-6.9/mac.o] Error 1
make[4]: *** [/home/mate/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/linux-6.6.52/Makefile:1921: /home/mate/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/ath10k-ct-regular/ath10k-ct-2024.07.30~ac71b14d/ath10k-6.9] Error 2
make[3]: *** [Makefile:234: __sub-make] Error 2
make[3]: Leaving directory '/home/mate/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/linux-6.6.52'
make[2]: *** [Makefile:123: /home/mate/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/ath10k-ct-regular/ath10k-ct-2024.07.30~ac71b14d/.built] Error 2
make[2]: Leaving directory '/home/mate/openwrt-ipq/package/kernel/ath10k-ct'
time: package/kernel/ath10k-ct/regular/compile#2.45#0.14#2.99
    ERROR: package/kernel/ath10k-ct failed to build (build variant: regular).
make[1]: *** [package/Makefile:177: package/kernel/ath10k-ct/compile] Error 1
make[1]: Leaving directory '/home/mate/openwrt-ipq'
make: *** [/home/mate/openwrt-ipq/include/toplevel.mk:248: package/ath10k-ct/compile] Error 2

I can fix this by updating the 999-001-fix-ath10k_update_vif_offload patch from 6.7 to 6.9 and running make package/ath10k-ct/refresh

After this everything compiles normally, however I get a kernel panic:

[   17.188696] ath11k_pci 0000:01:00.0: chip_id 0x0 chip_family 0x0 board_id 0xff soc_id 0xffffffff
[   17.188751] ath11k_pci 0000:01:00.0: fw_version 0x290607b9 fw_build_timestamp 2023-10-12 01:21 fw_build_id
[   17.208682] kmodloader: done loading kernel modules from /etc/modules.d/*
[   17.456475] Unable to handle kernel read from unreadable memory at virtual address 0000000000000010
[   17.456524] Mem abort info:
[   17.464406]   ESR = 0x0000000096000005
[   17.467108]   EC = 0x25: DABT (current EL), IL = 32 bits
[   17.470931]   SET = 0, FnV = 0
[   17.476412]   EA = 0, S1PTW = 0
[   17.479257]   FSC = 0x05: level 1 translation fault
[   17.482299] Data abort info:
[   17.487165]   ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
[   17.490287]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[   17.495585]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[   17.500705] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000045e06000
[   17.506090] [0000000000000010] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[   17.512430] Internal error: Oops: 0000000096000005 [#1] SMP
[   17.520929] Modules linked in: jitterentropy_rng pppoe ppp_async nft_fib_inet nf_flow_table_inet l2tp_ppp ath11k_pci(O) ath11k_ahb(O) ath11k(O) ath10k_pci(O) ath10k_core(O) ath(O) wireguard pptp pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject_bridge nft_reject nft_redir nft_quota nft_numgen nft_nat nft_meta_bridge nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack_netlink nf_conntrack_bridge nf_conntrack mac80211(O) libchacha20poly1305 chacha_neon cfg80211(O) slhc qrtr_smd qrtr_mhi qrtr qmi_helpers(O) poly1305_neon nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 mhi libcurve25519_generic libcrc32c libchacha compat(O) ntfs3 sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred act_gact qca_nss_wifi_meshmgr(O) qca_nss_bridge_mgr(O) qca_nss_vlan(O) ledtrig_usbport ledtrig_pattern
[   17.521070]  ledtrig_oneshot ledtrig_activity qca_mcs(O) ksmbd nls_ucs2_utils cifs_arc4 asn1_decoder msdos ip_gre gre qca_nss_drv(O) l2tp_netlink l2tp_core udp_tunnel ip6_udp_tunnel oid_registry ip_tunnel nls_utf8 nls_iso8859_1 nls_cp437 zram zsmalloc sha512_generic sha512_arm64 sha2_ce sha256_arm64 seqiv sha3_generic drbg michael_mic md5 hmac geniv des_generic cmac uas usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom ledtrig_transient qca_nss_dp(O) qca_ssdk(O) ramoops reed_solomon pstore gpio_button_hotplug(O) vfat fat f2fs ext4 mbcache jbd2 exfat aquantia hwmon crc_ccitt crc32c_generic crc32_generic
[   17.648695] CPU: 1 PID: 95 Comm: kworker/u8:3 Tainted: G           O       6.6.52 #0
[   17.670933] Hardware name: Xiaomi AX9000 (DT)
[   17.678654] Workqueue: ath11k_qmi_driver_event ath11k_qmi_deinit_service [ath11k]
[   17.682913] pstate: 40400005 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   17.690376] pc : ath11k_dbring_buf_cleanup+0xc38/0x1060 [ath11k]
[   17.697145] lr : ath11k_wmi_cmd_init+0x64/0x55c [ath11k]
[   17.703394] sp : ffffffc08177bb40
[   17.708686] x29: ffffffc08177bb40 x28: dead000000000122 x27: ffffff8011580168
[   17.711905] x26: dead000000000100 x25: ffffff8011580000 x24: ffffff8011580018
[   17.719023] x23: ffffff8011590000 x22: ffffff8011581068 x21: ffffff801158bf28
[   17.726140] x20: ffffff8011580000 x19: ffffff8011580000 x18: 0000000000005d70
[   17.733259] x17: 00000000000014b0 x16: 0000000000001498 x15: 0000000000005fa0
[   17.740376] x14: 0000000000001478 x13: 0000000000001458 x12: 0000000000000006
[   17.747495] x11: ffffffc080b6fe80 x10: 0000000000001b90 x9 : 0000000000000000
[   17.754613] x8 : ffffffc08177bcd0 x7 : 0000000000000000 x6 : 000000000000003f
[   17.761731] x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffffff8011590000
[   17.768848] x2 : 0000000000000010 x1 : ffffffc08177bbc4 x0 : ffffff8011580000
[   17.775968] Call trace:
[   17.783076]  ath11k_dbring_buf_cleanup+0xc38/0x1060 [ath11k]
[   17.785340]  ath11k_core_qmi_firmware_ready+0x190/0x580 [ath11k]
[   17.791242]  ath11k_qmi_deinit_service+0x1120/0x1950 [ath11k]
[   17.797231]  process_one_work+0x178/0x2d4
[   17.802870]  worker_thread+0x2ec/0x4d8
[   17.806862]  kthread+0xdc/0xe0
[   17.810508]  ret_from_fork+0x10/0x20
[   17.813550] Code: b949e402 b9506004 f9610465 d37df042 (b86268a2)
[   17.817285] ---[ end trace 0000000000000000 ]---
[   17.827891] pstore: backend (ramoops) writing error (-28)
[   17.827962] Kernel panic - not syncing: Oops: Fatal exception
[   17.833257] SMP: stopping secondary CPUs
[   17.838986] Kernel Offset: disabled
[   17.842973] CPU features: 0x0,00000000,00000000,0000400b
[   17.846190] Memory Limit: none
[   18.856222] Rebooting in 1 seconds..

Full bootlog

I've tried several things, GCC 13,14, different optimization levels, etc, but it's always this same crash

I am building on Windows 11 through WSL, that could cause some issuses maybe, but regular OpenWRT builds have always worked before.

Thanks in advance!

1 Like

My VirtualBox instance is having trouble connecting to the internet after flashing the latest build on qualcommax-6.x-nss-mx4300. Are other people having this problem too?

Edit: Latest commit (835915e) fixed this

I have the same issue.

I am able to successfully build and run quectel protocol

however it looks like upload was capped to less than 1 mbps

any idea ?

in case there any issues with udp try this

ethtool -K rx-udp-gro-forwarding off rx-gro-list off

Trying to compile with todays commits from scratch, I see this error. Anyone else?

make[6]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/home/debian/openwrt-ipq/staging_dir/host/include'
 /home/debian/openwrt-ipq/staging_dir/host/bin/install -c -m 644 src/mpc.h '/home/debian/openwrt-ipq/staging_dir/host/include'
make[6]: Leaving directory '/home/debian/openwrt-ipq/build_dir/host/mpc-1.3.1'
make[5]: Leaving directory '/home/debian/openwrt-ipq/build_dir/host/mpc-1.3.1'
make[4]: Leaving directory '/home/debian/openwrt-ipq/build_dir/host/mpc-1.3.1'
mkdir -p /home/debian/openwrt-ipq/staging_dir/host/stamp
touch /home/debian/openwrt-ipq/build_dir/host/mpc-1.3.1/.built
touch /home/debian/openwrt-ipq/staging_dir/host/stamp/.mpc_installed 
make[3]: Leaving directory '/home/debian/openwrt-ipq/tools/mpc'
time: tools/mpc/compile#11.10#8.09#19.23
make[3]: Entering directory '/home/debian/openwrt-ipq/tools/mold'
mkdir -p "/home/debian/openwrt-ipq/build_dir/host/mold-2.33.0"
(cd /home/debian/openwrt-ipq/build_dir/host/mold-2.33.0; CFLAGS="-O2 -I/home/debian/openwrt-ipq/staging_dir/host/include " CXXFLAGS="-O2 -I/home/debian/openwrt-ipq/staging_dir/host/include " LDFLAGS="-L/home/debian/openwrt-ipq/staging_dir/host/lib " cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER="/home/debian/openwrt-ipq/staging_dir/host/bin/ccache" -DCMAKE_C_COMPILER="/home/debian/openwrt-ipq/staging_dir/host/bin/gcc" -DCMAKE_CXX_COMPILER_LAUNCHER="/home/debian/openwrt-ipq/staging_dir/host/bin/ccache" -DCMAKE_CXX_COMPILER="/home/debian/openwrt-ipq/staging_dir/host/bin/g++" -DCMAKE_ASM_COMPILER_LAUNCHER="/home/debian/openwrt-ipq/staging_dir/host/bin/ccache" -DCMAKE_ASM_COMPILER="/home/debian/openwrt-ipq/staging_dir/host/bin/gcc" -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_EXE_LINKER_FLAGS:STRING="-L/home/debian/openwrt-ipq/staging_dir/host/lib " -DCMAKE_MODULE_LINKER_FLAGS:STRING="-L/home/debian/openwrt-ipq/staging_dir/host/lib " -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L/home/debian/openwrt-ipq/staging_dir/host/lib " -DCMAKE_FIND_ROOT_PATH="/home/debian/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/host;/home/debian/openwrt-ipq/staging_dir/hostpkg;/home/debian/openwrt-ipq/staging_dir/host" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_STRIP=: -DCMAKE_INSTALL_PREFIX=/home/debian/openwrt-ipq/staging_dir/host -DCMAKE_PREFIX_PATH=/home/debian/openwrt-ipq/staging_dir/host -DCMAKE_SKIP_RPATH=TRUE -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_EXPORT_PACKAGE_REGISTRY=FALSE -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE -DCMAKE_FIND_USE_PACKAGE_REGISTRY=FALSE -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=TRUE -DCMAKE_GENERATOR="Ninja" -DMOLD_LTO=ON -DMOLD_MOSTLY_STATIC=ON -DMOLD_USE_SYSTEM_MIMALLOC=OFF -DMOLD_USE_SYSTEM_TBB=ON /home/debian/openwrt-ipq/build_dir/host/mold-2.33.0 )
Not searching for unused variables given on the command line.
-- 
 * AMD64 assembly, The library uses hand written amd64 SIMD assembly.

-- ZSTD VERSION: 1.5.6
-- CMAKE_INSTALL_PREFIX: /home/debian/openwrt-ipq/staging_dir/host
-- CMAKE_INSTALL_LIBDIR: lib
-- ZSTD_LEGACY_SUPPORT defined!
-- ZSTD_MULTITHREAD_SUPPORT is enabled
-- 
-- Override standard malloc (MI_OVERRIDE=ON)
-- 
-- Library base name: mimalloc
-- Version          : 2.1
-- Build type       : release
-- C Compiler       : /home/debian/openwrt-ipq/staging_dir/host/bin/gcc
-- Compiler flags   : -Wall;-Wextra;-Wno-unknown-pragmas;-fvisibility=hidden;-Wstrict-prototypes;-ftls-model=initial-exec;-fno-builtin-malloc
-- Compiler defines : 
-- Link libraries   : pthread;rt;atomic
-- Build targets    : shared;static;object
-- 
CMake Error at CMakeLists.txt:212 (find_package):
  By not providing "FindTBB.cmake" in CMAKE_MODULE_PATH this project has                                                                          
  asked CMake to find a package configuration file provided by "TBB", but                                                                         
  CMake did not find one.                                                                                                                         
                                                                                                                                                  
  Could not find a package configuration file provided by "TBB" with any of                                                                       
  the following names:                                                                                                                            
                                                                                                                                                  
    TBBConfig.cmake                                                                                                                               
    tbb-config.cmake                                                                                                                              
                                                                                                                                                  
  Add the installation prefix of "TBB" to CMAKE_PREFIX_PATH or set "TBB_DIR"                                                                      
  to a directory containing one of the above files.  If "TBB" provides a                                                                          
  separate development package or SDK, be sure it has been installed.                                                                             
                                                                                                                                                  
                                                                                                                                                  
-- Configuring incomplete, errors occurred!
make[3]: *** [Makefile:24: /home/debian/openwrt-ipq/build_dir/host/mold-2.33.0/.configured] Error 1
make[3]: Leaving directory '/home/debian/openwrt-ipq/tools/mold'
time: tools/mold/compile#0.12#0.11#0.23
    ERROR: tools/mold failed to build.
make[2]: *** [tools/Makefile:231: tools/mold/compile] Error 1
make[2]: Leaving directory '/home/debian/openwrt-ipq'
make[1]: *** [tools/Makefile:227: /home/debian/openwrt-ipq/staging_dir/host/stamp/.tools_compile_nyyynyynnnyyyynynyyyyyyynyyyyynyynnynnyyyyyyyyyyyyyyyyyynynnyyyyynyyy] Error 2
make[1]: Leaving directory '/home/debian/openwrt-ipq'
make: *** [/home/debian/openwrt-ipq/include/toplevel.mk:248: world] Error 2

The difference to my prevous compilation is I changed the flag to -O2 as in config-nss.seed. Trying to compile with -O3 after that fails too. Now trying to compile without MOLD.
ChatGPT says this
"The error you're encountering during the OpenWRT build is caused by the missing Intel Threading Building Blocks (TBB) package. Specifically, CMake is unable to find the TBBConfig.cmake or tbb-config.cmake files, which are needed to build the tool mold."

The mold Makefile got altered with the "wifi stats" patch requiring "TBB on". As a lot of things cut out by default from packages I would assume this is the case here. Maybe it's even not shipped with the default package. So a simple "on" would not be enough. Just try to compile with "TBB off" within tools/mold/Makefile. Maybe the patch works anyway.

1 Like

I've just installed libtbb-dev and trying again with mold selected. Let's see.
Update - seems like it's OK.

Looks like I had a bug

Scenario
Fresh install latest commit using 12.5 nss firmware.

  1. Added interface for quectel cellular = doesnt connect.

  2. Removed quectel cellular and added qmi cellular protocol = doesnt connect.

  3. Removed qmi and added quectel cellular again = successfully connected.

Reboot, quectel cellular is not working again need to repeat step 1.

@qosmio
image

Is there any solution to this warning when compiling with multiple cores?

Are there any benefits to build mold?

Check the Readme. I cannot say more.

having trouble building from @qosmio 's qualcommax-6.x-nss-wifi-6.11 - for some reason i'm getting

../src/ap/hostapd.c: In function 'hostapd_fill_csa_settings':
../src/ap/hostapd.c:4515:27: error: 'struct hostapd_config' has no member named 'he_mu_edca'
 4515 |          hapd->iface->conf->he_mu_edca.he_qos_info &= 0xfff0;
      |                           ^

and i cannot figure out for the life of me why

edit: some details-

build variant: wpad-full-openssl, NSS_MESH_SUPPORT is off.

@qosmio https://github.com/qosmio/openwrt-ipq/commit/6dc645a551eba66a5ed6cf69caebbfed6480f29c

Is there maybe a bit more in that commit than what the message says?

From what I see, he's also got the stay on current partition for linksys devices PR in there (not that I am complaining as I have been patching that in myself): https://github.com/openwrt/openwrt/pull/14720

And perhaps some other changes. This one at least stood out to me.

Hi @qosmio

I think this commit is not right or things got mixed up.

Link: https://github.com/qosmio/openwrt-ipq/commit/6dc645a551eba66a5ed6cf69caebbfed6480f29c

Regards, Agustin

1 Like