Qualcommax NSS Build

I'm building using your config right now. What do you think? do you find any difference than previous one? I enable the pbuf to 512mb because I use torrent.

There are even more kernel crypto ASM optimized modules after this one.
Let's see if the performance will go up. It's stated so in the commit message.
I don't know if an additional option/s for this should be selected in make menuconfig or it's enabled by default.
What performance increase should we expect - OpenSSL, Wireguard, anything else?
If anyone wants to test the wireguard performance before and after those commits, can go here for wg-bench.
I'll try it tomorrow on QNAP (edit - here they are). Today I tested it on RB5009.
Does anyone know what is the performance of IPSEC on ipq807x with and without NSS.
AFAIK unfortunately we cannot use the second crypto core of the NSS processor to boost the crypto performance. Anyone know why - missing QCA drivers/firmware?

robi says it crashes whenever it's enabled, and there is no document provide by qualcomm about how to use it

Yea, I've read most of this in the past at the time I haven't started using QNAP yet, so most of the details slipped from my memory.
Now another important question. I've tested the QNAP (NSS wifi) wireguard performance and the results look lower than expected.
Below are the results for comparison without NSS.
Here are the wg-bench results without NSS. (Updated with Simultaneous wg-bench & WAN Speedtest)
Iperf3 results without NSS.

Edit 1 - I've made additional really important tests that you can see on the updated link above.

So the total combined throughput of Speedtest WAN & Wg-bench is 1Gbps + 500Mbps for the NSS build and 500Mbps + ~600Mbps for non NSS build.
NSS build wins!

Edit 2 - Updated data with kernel 6.6.

1 Like

Hi there,

I have implemented a hardened OpenSSH configuration in my builds. The configuration uses the standards set by ssh-audit.com, but removes chacha20 and unsupported ciphers. Dirty flashing works, but you will get a "fingerprint has changed" warning the next time you ssh into your router.

1 Like

I'm really curious... How did you get r25515 with kernel 6.1.79, when we're currently on r25398 (which is already on kernel 6.1.80)?

That is my 3 day old compile. But does it matter?
There is a new commit - ath11k-firmware: Move from kvalo to new upstream repository.

Ah, not really, I was just surprised by the r-number.

So the offload shows significant help here because WG is producing high loading on CPU which will impact other CPU intensive work.
I need to find some days to test with my Buffalo WXR-5950AX12....

1 Like

Is anyone experiencing unresponsiveness for minutes when enabling nss_wifi on ax3600, whether wired or wireless?
on commit ccaf824

Hi boys,

This version include NSS offload for WiFi (MESH NOT WORKING)

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

Changelog (include upstream of OpenWRT):

  • Updated the kernel to 6.1.80.
  • Cleanup the kernel config, only keep, performance governor as default and preemptive kernel mode.
  • Added the crypto module optimized for ARM of @robimarko
  • Enabled again the modules of Mesh with NSS firmware 12.0 (MESH is not working).
  • Added the "ugly hack" from @qosmio for add NSS stats to LUCI.

Notes:

Sources:

BUILDED: https://github.com/AgustinLorenzo/openwrt/releases/tag/ipq807x-nsswifi-2024-03-09-0336

NOTE: Now I am only compiling for the AX3600, AX6 and AX9000 and Dynalink DL-WRX36 and Buffalo WXR-5950AX12 and QNAP QHora-301W devices and Netgear RAX120v2, if anyone has used my versions with other devices, tell me and I will add them again.

Regards, Agustin

1 Like

Hi boys,

This version include NSS offload for WiFi (MESH SHOULD BE WORK)

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

Changelog (include upstream of OpenWRT):

  • Updated the kernel to 6.1.80.
  • Cleanup the kernel config, only keep, performance governor as default and preemptive kernel mode.
  • Added the crypto module optimized for ARM of @robimarko
  • Added the "ugly hack" from @qosmio for add NSS stats to LUCI.
  • Downgrade to NSS 11.4 firmware (should be work Mesh with NSS, TEST and give me feedback)

Notes:

Sources:

BUILDED: https://github.com/AgustinLorenzo/openwrt/releases/tag/ipq807x-nsswifi-mesh-2024-03-09-1145

NOTE: Now I am only compiling for the AX3600, AX6 and AX9000 and Dynalink DL-WRX36 and Buffalo WXR-5950AX12 and QNAP QHora-301W devices and Netgear RAX120v2, if anyone has used my versions with other devices, tell me and I will add them again.

Regards, Agustin

1 Like

I tried your build (nss-wifi with mesh), and my CPU 0 stays at 100%. Don't know what's causing it.

Edit: tried latest nss wifi with no mesh, cpu usage is okay.

Just pushed 2 BIG updates that I'd like to get feed back on.

1.) qualcommax-6.1-nss-wifi-skb -

2.) nss-packages - Properly build drv/client based on FW
For users interested in the NSS mesh builds that require NSS FW 11.4

Added a new branch qualcommax-6.1-nss-wifi-skb that brings in skb related patches from QSDK. I've noticed a significant reduction in memory usage when enabling the pbuf script, and consistent TX/RX speeds.

On branch qualcommax-6.1-nss-wifi-skb, need to get feedback from AX3600 users if setting 512MB still crashes.

So try with the following.

1.) Enable ATH11K_MEM_PROFILE_512M
2.) Enable ATH11K_MEM_PROFILE_1G
3.) Enable ATH11K_MEM_PROFILE_512M but delete patches

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

Thanks for the big update. I have some trouble building it though

Getting the following errors when building:

2024-03-09T18:10:26.9677657Z Applying /home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder/package/kernel/qca-ssdk/patches/0003-Revert-qca-ssdk-enable-invoking-fdb-del-function-for.patch using plaintext: 
2024-03-09T18:10:26.9689387Z patching file src/ref/ref_acl.c
2024-03-09T18:10:26.9692376Z 
2024-03-09T18:10:26.9693866Z Applying /home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder/package/kernel/qca-ssdk/patches/0004-fix-compile-warnings.patch using plaintext: 
2024-03-09T18:10:26.9703384Z patching file src/adpt/adpt.c
2024-03-09T18:10:26.9706686Z patching file src/fal/fal_port_ctrl.c
2024-03-09T18:10:26.9711577Z patching file src/fal/fal_portvlan.c
2024-03-09T18:10:26.9715018Z patching file Makefile
2024-03-09T18:10:26.9717820Z 
2024-03-09T18:10:26.9719596Z Applying /home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder/package/kernel/qca-ssdk/patches/101-hsl_phy-add-support-for-detection-PSGMII-PHY-mode.patch using plaintext: 
2024-03-09T18:10:26.9729654Z patching file src/hsl/phy/hsl_phy.c
2024-03-09T18:10:26.9730722Z Hunk #1 succeeded at 1326 (offset -9 lines).
2024-03-09T18:10:26.9734419Z 
2024-03-09T18:10:26.9736331Z Applying /home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder/package/kernel/qca-ssdk/patches/102-qca-ssdk-support-selecting-PCS-channel-for-PORT3-on-.patch using plaintext: 
2024-03-09T18:10:26.9745637Z patching file include/init/ssdk_dts.h
2024-03-09T18:10:26.9746419Z Hunk #2 succeeded at 161 (offset -2 lines).
2024-03-09T18:10:26.9747835Z patching file src/adpt/cppe/adpt_cppe_portctrl.c
2024-03-09T18:10:26.9750755Z patching file src/adpt/hppe/adpt_hppe_uniphy.c
2024-03-09T18:10:26.9751593Z Hunk #1 succeeded at 1152 (offset 30 lines).
2024-03-09T18:10:26.9752616Z Hunk #2 succeeded at 1161 (offset 30 lines).
2024-03-09T18:10:26.9754001Z patching file src/init/ssdk_dts.c
2024-03-09T18:10:26.9755162Z patch: **** malformed patch at line 101: @@ -306,6 +313,25 @@ static void ssdk_dt_parse_mac_mode(a_uin
2024-03-09T18:10:26.9755900Z 
2024-03-09T18:10:26.9757392Z Patch failed!  Please fix /home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder/package/kernel/qca-ssdk/patches/102-qca-ssdk-support-selecting-PCS-channel-for-PORT3-on-.patch!
2024-03-09T18:10:26.9761397Z make[3]: *** [Makefile:103: /home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-ssdk-2023-11-30-3153d906/.prepared_7c7bd9f76c32530596b29c13955cb55f_6664517399ebbbc92a37c5bb081b5c53] Error 1
2024-03-09T18:10:26.9763122Z make[3]: Leaving directory '/home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder/package/kernel/qca-ssdk'
2024-03-09T18:10:26.9765555Z time: package/kernel/qca-ssdk/compile#0.18#0.15#0.27
2024-03-09T18:10:26.9773389Z     ERROR: package/kernel/qca-ssdk failed to build.
2024-03-09T18:10:26.9778018Z make[2]: *** [package/Makefile:129: package/kernel/qca-ssdk/compile] Error 1
2024-03-09T18:10:26.9782668Z make[2]: Leaving directory '/home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder'
2024-03-09T18:10:26.9810524Z make[1]: *** [package/Makefile:123: /home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2
2024-03-09T18:10:26.9816627Z make[1]: Leaving directory '/home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder'
2024-03-09T18:10:26.9847694Z make: *** [/home/runner/work/Qualcommax_NSS_Builder/Qualcommax_NSS_Builder/include/toplevel.mk:233: world] Error 2
2024-03-09T18:10:26.9865247Z ##[error]Process completed with exit code 2.

https://productionresultssa4.blob.core.windows.net/actions-results/31a20541-89b7-4f37-8e0f-bbe6a7e9647f/workflow-job-run-ca395085-040a-526b-2ce8-bdc85f692774/logs/job/job-logs.txt?rsct=text%2Fplain&se=2024-03-09T18%3A30%3A17Z&sig=f4tA9RmpVbr3G6SEeYI0d8JPfx8X2x93JFuBaxcuhz4%3D&sp=r&spr=https&sr=b&st=2024-03-09T18%3A20%3A12Z&sv=2021-12-02

Edit the culprit appears to be: fdb563c

@robimarko

Updated it to use existing framework in LuCI.

diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js
index 45f7b4acae..eb517df296 100644
--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js
+++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js
@@ -25,14 +25,26 @@ return baseclass.extend({
 		return Promise.all([
 			L.resolveDefault(callSystemBoard(), {}),
 			L.resolveDefault(callSystemInfo(), {}),
-			L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' })
+			L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' }),
+			fs.lines('/sys/kernel/debug/qca-nss-drv/stats/cpu_load_ubi').then(L.bind(function(lines) {
+			  var stats = [];
+			  for (var i = 0; i < lines.length; i++) {
+				  if (lines[i].match(/%/)) {
+					var stat = lines[i].split(/\s+/);
+					stats['avg'] = stat[1];
+					stats['max'] = stat[2];
+					return stats;
+				  }
+			  }
+			}))
 		]);
 	},
 
 	render: function(data) {
 		var boardinfo   = data[0],
 		    systeminfo  = data[1],
-		    luciversion = data[2];
+		    luciversion = data[2],
+		    nssinfo     = data[3];
 
 		luciversion = luciversion.branch + ' ' + luciversion.revision;
 
@@ -64,7 +76,8 @@ return baseclass.extend({
 				systeminfo.load[0] / 65535.0,
 				systeminfo.load[1] / 65535.0,
 				systeminfo.load[2] / 65535.0
-			) : null
+			) : null,
+			_('NSS Load'),         (L.isObject(nssinfo) ? 'Avg: %s Max: %s'.format(nssinfo.avg, nssinfo.max) : null)
 		];
 
 		var table = E('table', { 'class': 'table' });
diff --git a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json
index 45dd7d7d9e..987081970c 100644
--- a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json
+++ b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json
@@ -31,6 +31,7 @@
 		"read": {
 			"cgi-io": [ "exec" ],
 			"file": {
+				"/sys/kernel/debug/qca-nss-drv/stats/cpu_load_ubi": [ "read" ],
 				"/bin/dmesg -r": [ "exec" ],
 				"/sbin/logread": [ "stat" ],
 				"/sbin/logread -e ^": [ "exec" ],
3 Likes

@JuliusBairaktaris Should be fixed in latest commit

2024-03-09 - eab2f25b87 - Merge branch 'qualcommax-6.1-nss-wifi' of https://github.com/qosmio/openwrt-ipq into qualcommax-6.1-nss-wifi
2024-03-09 - 8b8f7c1a76 - ssdk: fix parallel building
2024-03-09 - 8da30d81ed - ssdk: switch back to NHSS.QSDK.12.4
2024-03-09 - 1c9999743b - ssdk: fix parallel building
2024-03-09 - 09b52ea0a5 - ssdk: switch back to 3.0 from 3.1

Yes everything is working! Thanks!

.\iperf3.exe -c 192.168.1.1
Connecting to host 192.168.1.1, port 5201
[  4] local 192.168.1.65 port 22948 connected to 192.168.1.1 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  94.5 MBytes   792 Mbits/sec
[  4]   1.00-2.00   sec  95.8 MBytes   804 Mbits/sec
[  4]   2.00-3.00   sec  95.9 MBytes   804 Mbits/sec
[  4]   3.00-4.00   sec  95.0 MBytes   796 Mbits/sec
[  4]   4.00-5.00   sec  94.1 MBytes   789 Mbits/sec
[  4]   5.00-6.00   sec  95.0 MBytes   798 Mbits/sec
[  4]   6.00-7.00   sec  95.9 MBytes   804 Mbits/sec
[  4]   7.00-8.00   sec  95.5 MBytes   801 Mbits/sec
[  4]   8.00-9.00   sec  93.8 MBytes   786 Mbits/sec
[  4]   9.00-10.00  sec  94.4 MBytes   793 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   950 MBytes   797 Mbits/sec                  sender
[  4]   0.00-10.00  sec   950 MBytes   797 Mbits/sec                  receiver

ca. 80 Mbits bump. Very nice. This is without Pbuf

1 Like

Btw I dont feel comfortable opening up my ax3600 to test whats wrong on the 2kb branch as I dont have a spare router and need it atm.

Switch to ATH11K_MEM_PROFILE_1G, it will keep default behavior of in ath11k of not reducing SKB to 2KB, while still allowing SKB recycling to be enabled.