Qualcommax NSS Build

You should also be able use WPA2/WPA3 mixed mode without issue too :slight_smile:

BTW since you have an AX3600, can you please test with enabling the option to use NSS redirect for mac80211?

echo options mac80211 nss_redirect=1 >> /etc/modules.conf
reboot

Then check to see if you're getting offloaded wifi traffic for your IoT radio:
cat /sys/kernel/debug/qca-nss-drv/stats/virt_if

If you wanted to include that as default in your build then also enable the build option:
CONFIG_PACKAGE_MAC80211_NSS_REDIRECT=y

Sorry,I never use IoT radio(ath10k) :sweat_smile:

I think IoT radio just a waste of memory for me.

1 Like

I tried it again by renaming the 5G AP and connecting just one AX device to it and got the same result. Unfortunately, it looks like wired speed is down low now too. I'm going to assume that its now on account of the fact that its after 8PM on a saturday, so lots of people streaming videos and making things slow. I'll give it another shot in the morning and see how it goes.

The server is an upstream router in my home so it should not be a bottleneck. I have tested again and found that when using iperf3 with -R (server sending), the performance is as expected. Without -R, I can only get ~10Mbps.

root@OpenWrt:/# iperf3 -c 192.168.128.1 -R
Connecting to host 192.168.128.1, port 5201
Reverse mode, remote host 192.168.128.1 is sending
[  5] local 192.168.128.194 port 51374 connected to 192.168.128.1 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   112 MBytes   934 Mbits/sec
[  5]   1.00-2.00   sec   112 MBytes   942 Mbits/sec
^C[  5]   2.00-2.98   sec   110 MBytes   942 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-2.98   sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-2.98   sec   333 MBytes   939 Mbits/sec                  receiver
iperf3: interrupt - the client has terminated

root@OpenWrt:/# iperf3 -c 192.168.128.1
Connecting to host 192.168.128.1, port 5201
[  5] local 192.168.128.194 port 51398 connected to 192.168.128.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  1.00 MBytes  8.38 Mbits/sec   70   4.24 KBytes
[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec    3   1.41 KBytes
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
^C[  5]   3.00-3.45   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-3.45   sec  1.00 MBytes  2.43 Mbits/sec   73             sender
[  5]   0.00-3.45   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated

I am using a bare minimum config for NSS

CONFIG_ATH11K_NSS_SUPPORT=y
CONFIG_NSS_DRV_CRYPTO_ENABLE=y
CONFIG_NSS_DRV_IPV6_ENABLE=y
CONFIG_NSS_DRV_PPPOE_ENABLE=y
CONFIG_NSS_DRV_PPTP_ENABLE=y
CONFIG_NSS_DRV_VIRT_IF_ENABLE=y
CONFIG_NSS_DRV_WIFIOFFLOAD_ENABLE=y
CONFIG_NSS_DRV_WIFI_EXT_VDEV_ENABLE=y
CONFIG_NSS_MEM_PROFILE_HIGH=y
CONFIG_PACKAGE_MAC80211_NSS_SUPPORT=y
CONFIG_PACKAGE_kmod-qca-nss-drv=y
CONFIG_PACKAGE_kmod-qca-nss-ecm=y
CONFIG_PACKAGE_nss-eip-firmware=y
CONFIG_PACKAGE_nss-firmware-ipq8074=y

@robimarko
Off topic but can U take a look at this
commit

for xiaomi routers ax6

upstream openwrt use whole first partition (35M) for kernel. and use second partition as rootfs. that just waste space.

this commit use first partition as kernel+rootfs, and second partition as rootfs_data for overlayfs. free up about 20M space.

I have tested on my ax6 without any problem. but I don't have ax3600 and ax9000 to test.
Is it prosable to make this upstream?

1 Device connected to the ath10k. 4 Connected to ath11k. Ath11k running in wpa2/3 mixed mode. Device used Xiaomi AX3600

if_num 33 stats start:

rx_packets = 37052
rx_bytes = 55175269
rx_dropped = 0
tx_packets = 8264
tx_bytes = 659930
tx_enqueue_failed = 0
shaper_enqueue_failed = 0
ocm_alloc_failed = 0
if_num 33 stats end:

if_num 39 stats start:

rx_packets = 0
rx_bytes = 0
rx_dropped = 0
tx_packets = 0
tx_bytes = 0
tx_enqueue_failed = 0
shaper_enqueue_failed = 0
ocm_alloc_failed = 0
if_num 39 stats end:

if_num 42 stats start:

rx_packets = 0
rx_bytes = 0
rx_dropped = 0
tx_packets = 0
tx_bytes = 0
tx_enqueue_failed = 0
shaper_enqueue_failed = 0
ocm_alloc_failed = 0
if_num 42 stats end:

base node stats begin (shown on if_num 42):

active_interfaces = 6
ocm_alloc_failed = 0
ddr_alloc_failed = 0
base node stats end.

Nope, we intentionally use first partition as kernel and second as rootfs as this matches what bootloader wants to read

but this commit don't need any bootloader modify. it just place squashfs into different pace.

And it will break upgrading, forcing new compat version and migrations etc, really not worth it

:star2: Introducing the Qualcommax_NSS_Builder Repository! :star2:

Hey everyone,

I'm excited to share a project that I've been working on: the Qualcommax_NSS_Builder repository!

:link: Qualcommax_NSS_Builder on GitHub

The goal of this repository is to automate the creation of NSS-enabled firmware builds specifically for the Xiaomi AX3600, utilizing the incredible groundwork laid by @qosmio's repo.

This project is also a comprehensive guide for anyone interested in creating their own NSS builds for different targets. I've made sure that the configuration is straightforward and adaptable, ensuring a smooth customization process for your specific needs.

:eyes: Check out the configuration details here: ax3600.config

Based on @qosmio' input and suggestions it offers full NSS offloading capabilites while keeping potential misconfigurations to a minimum by using an approach that creats the config file with default values except the once needed to get full NSS working.

Looking Forward

Based on community demand, I'm more than happy to expand the repository to include other popular targets like the AX6000, among others. Just let me know what you're looking for!

If you find value in these builds and appreciate the effort, please consider giving the repo a star! :sparkling_heart:

7 Likes

Thanks for your work !
I just installed your build on my AX3600
2.4G (radio2) work but 5G (radio1) band stay at 0 dBm ("Current power: 0 dBm") even when I force the Maximum transmit power to 20 dBm for exemple
I'm new to OpenWrt so not sure how to debug a Radio that don't want to "start" even when it's enable in the Wireless settings

Hey, please re-flash the sysupgrade and make sure to not keep your old settings.

All 3 antennas work without having to change anything.

After a bit more investigation it seems 5G work for bands 36 with a width of 160MHz
but not for band 100 with a width of 160MHz

@qosmio Can you investigate these errors when enabling SQM, please?

I think they come from CONFIG_PACKAGE_kmod-nss-ifb

Sun Feb 18 19:57:48 2024 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (2): /sbin/tc qdisc del dev pppoe-wan root
Sun Feb 18 19:57:48 2024 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
Sun Feb 18 19:57:48 2024 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (1): /sbin/tc qdisc del dev nssifb root
Sun Feb 18 19:57:48 2024 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: Cannot find device "nssifb"
Sun Feb 18 19:57:48 2024 user.notice SQM: ERROR: cmd_wrapper: ip: FAILURE (2): /sbin/ip link set dev nssifb down
Sun Feb 18 19:57:48 2024 user.notice SQM: ERROR: cmd_wrapper: ip: LAST ERROR: ip: SIOCGIFFLAGS: No such device
Sun Feb 18 19:57:48 2024 user.notice SQM: ERROR: cmd_wrapper: ip: FAILURE (2): /sbin/ip link delete nssifb type ifb
Sun Feb 18 19:57:48 2024 user.notice SQM: ERROR: cmd_wrapper: ip: LAST ERROR: ip: can't find device 'nssifb'
Sun Feb 18 19:57:48 2024 user.notice SQM: Starting SQM script: nss-rk.qos on wan, in: 165000 Kbps, out: 80000 Kbps
Sun Feb 18 19:57:48 2024 user.notice SQM: ERROR: sqm_prepare_script: The NSSifb driver only works with ethX interfaces. Not doing anything.
Sun Feb 18 19:57:48 2024 user.notice SQM: sqm_start: egress shaping activated
Sun Feb 18 19:57:48 2024 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (1): /sbin/tc qdisc add dev nssifb root handle 1: nsstbl rate 165000kbit burst 20636 mtu 44b
Sun Feb 18 19:57:49 2024 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: Cannot find device "nssifb"
Sun Feb 18 19:57:49 2024 user.notice SQM: ERROR: ingress: failed to add shaper
Sun Feb 18 19:57:49 2024 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (1): /sbin/tc qdisc add dev nssifb parent 1: handle 10: nssfq_codel limit 46875 target 5ms flows 1024 interval 100ms quantum 304 set_default
Sun Feb 18 19:57:49 2024 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: Cannot find device "nssifb"
Sun Feb 18 19:57:49 2024 user.notice SQM: ERROR: ingress: failed to add shaper
Sun Feb 18 19:57:50 2024 user.notice SQM: ERROR: cmd_wrapper: ip: FAILURE (2): /sbin/ip link set up nssifb
Sun Feb 18 19:57:50 2024 user.notice SQM: ERROR: cmd_wrapper: ip: LAST ERROR: ip: SIOCGIFFLAGS: No such device
Sun Feb 18 19:57:50 2024 user.notice SQM: WARNING: sqm_start: nss-rk.qos lacks ingress() function or exited with an error
Sun Feb 18 19:57:50 2024 user.notice SQM: nss-rk.qos was started on wan successfully

This currently causes the router to bootloop when SQM is enabled.

That's strange, I made it a dependency as to ensure nss-ifb get build whenever nss-drv-disc is chosen.

nss sqm scripts-> nss-drv-qdisc -> nss-ifb

is it not built at all?

How do you configure sqm to work with nss? I don't see anything in the sqm page of luci related to nss, and last time I tried to enable it, it just made everything really slow and ate up all the memory.

Its built. Are you certain that its not a naming issue (nss-fib and nssifb)?

CONFIG_PACKAGE_kmod-nss-ifb=y
CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc=y
CONFIG_PACKAGE_sqm-scripts-nss=y

Ah, I was missing one of the packages! Thank you very much.

I'm having a bit of a problem with my builds; if I attempt to install a package, it gives me a malformed package error. If I try to do a sysupgrade, it only works if I tell it to NOT keep settings -- it just bails on the sysupgrade otherwise.

For the most part, using a config provided by @qosmio several weeks ago.