Qualcommax NSS Build

Hi @starmane007,

Just remember to enable this service after every update of my build for mesh, because for security reasons I always leave it disabled (in some mesh11sd updates they make breaking changes with the config file, for example after upgrading from v3 to v4).

Regards, Agustin

2 Likes

Hi boys,

This version include NSS offload for WiFi

I am redo the repos over the latest commit from OpenWRT.

Changelog (include upstream of OpenWRT):

  • Updated the NSS kernel and software to version 6.6.50.
  • Removed the “kmod-ipt-nathelper-rtsp” module as it is generating instability with the ECM (NSS) module when running RTSP traffic. ping @eR2022
  • Added the following NSS modules (kmod-qca-nss-drv-lag-mgr, kmod-qca-nss-drv-map-t and kmod-qca-nss-drv-tun6rd) to support some Italian ISPs as they use specific configurations to provide IPv6.

Notes:

Sources:

BUILDED (NORMAL): https://github.com/AgustinLorenzo/openwrt/releases/tag/ipq807x-nsswifi-2024-09-10-1521

BUILDED (MESH BUILD): https://github.com/AgustinLorenzo/openwrt/releases/tag/ipq807x-nsswifi-mesh-2024-09-10-1718

NOTE: Now I only compile the build for the following devices AX3600, AX6, AX9000, Dynalink DL-WRX36, Buffalo WXR-5950AX12, QNAP QHora-301W, Netgear RAX120v2, Arcadyan AW1000, Zyxel NBG7815, Linksys MX4200 (v1 and v2), Netgear SXR80, Netgear SXS80, Spectrum SAX1V1K and Netgear WAX218 if someone has used my versions with other devices (and it is supported), let me know and I will add it.

6 Likes

@qosmio can confirm the rebased repo builds and works just fine on my end. Thanks for the ongoing support!

2 Likes

Me too, thank you. :slight_smile:

1 Like

Thanks :slight_smile:
Now VLC with RTSP is working fine

Hello
I'm new here and I have an AX3600 router with last stable OpenWRT version (23.05.4).

I found the wifi slow and not very powerful, that's why I would test your build. Can I upgrade the router with the sysupgrade build ? Should I reset all the config or can I keep my current config ?
If I need to reset the config, how can I save it to re-apply it once router upgraded ?

for those that are interested...

ive had a bit of extra time again so i decided this would be a great way to refresh my c as well as learn a bit of kernel hacking :wink:

@qosmio

ive spent a bit of time debugging this inactive time issue with 12.5.

so i have learnt how ath11k_dbg works debug_mask etc.

i added a few extra lines in the nss patches, mainly:

   ath11k_dbg(ab, ATH11K_DBG_NSS, "%pM : stainfo->deflink.tx_stats.packets[WME_AC_BE] : %llu\n", sta->addr, stainfo->deflink.tx_stats.packets[WME_AC_BE]);
   ath11k_dbg(ab, ATH11K_DBG_NSS, "%pM : peer->nss.nss_stats->tx_packets; : %d\n", sta->addr, peer->nss.nss_stats->tx_packets);

and

   ath11k_dbg(ab, ATH11K_DBG_NSS, "%pM : stainfo->deflink.tx_stats.bytes[WME_AC_BE] : %llu\n", sta->addr, stainfo->deflink.tx_stats.bytes[WME_AC_BE]);
   ath11k_dbg(ab, ATH11K_DBG_NSS, "%pM : peer->nss.nss_stats->tx_bytes : %d\n", sta->addr, peer->nss.nss_stats->tx_bytes);

in ath11k_nss_update_sta_stats.

so for whatever reason, both the tx and rx packet counts + bytes for most (but not all...) peers are not being updated:

image

ive also tried including ALL packet types (WME_AC_BK, etc) in the counters and the same issue continues...

also most likely it is not JUST the tx / rx packet / byte counts that are not being updated... im just focused on those 2 for now as im sure if / when i get those working then inactive time (_last_ack / last_rx?) will be right there as well.

whatever it is that is supposed to increment stainfo->deflink.tx_stats.bytes[WME_AC_BE] is just not taking place during regular traffic.

...im sure in the end i wont be able to figure this out but none the less a fun little session!

edit : instead of posting a new message ill just edit this one... upon furhter investigation i sort of have a loose grasp of how the stats work..

they are sent by the nss firmware in bundles of 9 peers... no idea why 9, but thats what the loop that iterates over the stats structure will max out at.

this issue appears to stem from the fact that the peer_id for whatever reason is lost somewhere in the process... if you turn on nss debugging with 11.4, you will notice the (relatively) infrequent "unable to find peer with id..." in your dmesg. for some strange reason its always the same 4 peers 1, 5 and a couple of others. so i would not be surprised that while the stats work fine with 11.4, they are not fully accurate...

but generally speaking, the stats work with 11.4.

with 12.5, 95%+ of the stats that are sent are with peer_id "0".

so when the driver attempts to check "who should i be allocating these stats to?", it is unable to find a matching peer.

again for some strange reason, a few random peers will work fine shrugs and their peer id will be correct and the stats will record + update correctly and find their way to your iw station dump command.

bare in mind the above is JUST for mcast + ucast + bcast packets... those are handled by one block. the other packets are handled by another block but im sure the issue is related / the same.

here is a post with the same errors in his dmesg:

3 Likes

Does anybody successfully run VLANs on this branch?

I've been running MX4300 on a non-NSS build for the past month+, with almost no issues, but want to try NSS. I've just built snapshot from this branch and can't auth to WiFi (everything else seems to be working). Here are steps:

  1. Configure Dumb AP, IPv4 only, dnmasq and firewall disabled. Works.
  2. Enable VLAN, add single VLAN1=U*, change Interface to br-vlan.1
  3. If encryption is enabled I can't connect to WiFi. If encryption is disabled - it works.

I've had the same issue with NSS build built around month ago.

Any ideas? Any settings I can play with to pinpoint issue, e.g. disable/enable NSS? Thanks.

These are available in the Qosmio's posts above. Just search for them.
You can start here

1 Like

Vlan bridge filtering on the DSA bridge does not work with the nss build.
You need to configure the Vlan on the individual LAN ports and then create a bridge interface on the VLAN port and finally an interface with the bridge port. You can assign this to the SSID. See Post #1526 Qualcommax NSS Build - #1526 by junky by junky.
This works for me in a similar Setup as yours on the AX3600 and LAN1.

Thing is that log is from when stats were updating fine again as I had recompiled ath11k to enable debug

yep.

when the stats work, i get the same peers as in your log.

when i install 12.5, i get a flood of peer id "0".

below is a log of my currently running 12.5.

on 11.4 my log looks much closer to yours... yes, some peers not found, but not like this.

[  127.198957] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.198965] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.198973] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.198982] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.219858] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.244915] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.269895] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.294874] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.298898] ath11k c000000.wifi: <?> nss wifili event received 12 response 5 error 2112
[  127.298919] ath11k c000000.wifi: <?> nss wifili: unable to find peer 5
[  127.298932] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.319849] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.344905] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.369896] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.394870] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.398892] ath11k c000000.wifi: <?> nss wifili event received 12 response 5 error 926208
[  127.398916] ath11k c000000.wifi: <?> nss wifili: unable to find peer 1
[  127.398930] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.398942] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.398953] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.398964] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.398976] ath11k c000000.wifi: <?> nss wifili: unable to find peer 2
[  127.398987] ath11k c000000.wifi: <?> nss wifili: unable to find peer 1
[  127.398998] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.399010] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.419845] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.444904] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.469885] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.494860] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.498887] ath11k c000000.wifi: <?> nss wifili event received 12 response 5 error 919616
[  127.498913] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.498926] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.498937] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.498948] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.498960] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.498971] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.498982] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.498993] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.519842] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.544901] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.569895] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.594873] ath11k c000000.wifi: <?> nss wifili event received 10 response 5 error 0
[  127.598894] ath11k c000000.wifi: <?> nss wifili event received 12 response 5 error 919616
[  127.598925] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.598935] ath11k c000000.wifi: <?> nss wifili: unable to find peer 58
[  127.598944] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.598952] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.598960] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.598968] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.598976] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0
[  127.598984] ath11k c000000.wifi: <?> nss wifili: unable to find peer 0

Hi, small question. Do I need to do something after flashing the NSS build? Should I disable irqbalance, packet steering, hardware offload or software offload? I will go from pure snapshot release to nss.
Thanks for help.

Thanks!

Edit2: it works, thanks a lot!!

  • I've created devices lan1.20 and lan2.20 (vlan=20). MX4300 in a Dumb AP mode connected to lan2.
  • Bridge br-home = lan1.20 and lan2.20
  • Create Interface Home -> bridge br-home
  • Assign interface Home to SSID.
  • Apply
    [Reboot] !!!!

yes, disable all of them.
And I presume it's already disabled/not enabled by default.

Thanks for reply
Yes, but I would like to avoid factory reset and just install sys upgrade package. Is it fine or I can not keep settings?

from vanilla openwrt SNAPSHOT to NSS build?

in that case, a factory reset is highly recommended.

Did someone test such way (without factory reset)?

BTW, some thread about nss with chapters like: how to move from vanilla to nss build, troubleshooting would be helpful. I don't say on wiki openwrt, but even on that forum in documentation section.

Hi, new in the OpenWRT world. I have an MX4200v1, used @AgustinLorenzo build with NSS and managed to get close to stock speed (5% loss with 1000/300). Should I enable Routing/NAT Offloading? Or any other setting? The only change I made was the wireless tab. Now my question is, can I install and update packages trough luci software tab? Would like to install NextDNS

ECM can, for the most part, be bumped to newer versions, without having to upgrade the NSS DRV, CLIENT packages. I really only ever bump it if I see bugfixes or changes specific to NSS. So if the logs show code changes are only for SFE/PPE/e-Mesh classifier, I'll avoid unnecessarily getting the latest. I'll add, I do check upstream fairly regularly for changes. Qcom just doesn't push all their changes in realtime.

Could you provide your /etc/config/network? The question of VLANs and NSS gets asked a lot here. I'm going to add it my repo in one of the example configs I have. Thanks

Treat vanilla and NSS as two different platforms. The jump is significant. The only base configs you can carry over are:

/etc/config/dhcp
/etc/config/system
/etc/config/wireless

No. That is for Mediatek devices, on anything else it will be software offloading and will break NSS. NSS builds don't need anything enabled. Everything is offloaded by default (LAN/WAN/WIFI).

2 Likes