IPQ806x NSS Drivers

If you look on my post a few days ago, I shared a script that does pretty much everything for me.
I ran it last night which gave me a clean build on the first go
I do my build on a separate VM to make sure I don't change something inadvertently

Anyway did you checked if you have nss offload is enabled for mac80211? I have to fix the driver since it's currently broken with that flag disabled but i don't have so much time.

Wifi speed is good (avg 530-560mbps on download per speedtest) and CPU usage appears lower. If it is not fully offloading... I’d love to see how much quicker it could go. :grin:

Thank you, I am building now. Once flashed, is there anything in LuCI I need to do to enable NSS or are these things on by default?

The NSS acceleration just works - you don’t need to click the hardware acceleration box in luci (no luci checkboxes or special configuration needed).

I have software offloading turned off and performance governor on.

I had one device that my settings were very customized (wifi and IRQ settings were a little crazy...) - I had to reset to the default settings and everything was fine . Otherwise I had no issues with more normal config settings on my other 2 r7800’s.

1 Like

Pretty decent difference in terms of CPU% and download throughput.

iphone7:
Without NSS download speed was 325 Mbps with NSS it was 445 Mbps. Difference was seen in htop. Without NSS it was saturating one of the cores. With NSS it was 20-25% across both cores at the peak.

With an older Macbook Pro:
Without NSS download speed was 282 Mbps with NSS it was 415 Mbps. Difference was seen in htop. Without NSS it was saturating one of the cores. With NSS it was 78% at its peak on a single core (both in use).

Hardware is R7800 with QoS (fq_codel/simplest-tbf.qos).

For comparison, when i run speedtest-netperf.sh on the router, I get around 500 Mbps.

cd /path/to/my/openwrt-git/
./scripts/feeds update -a
./scripts/feeds install -a
git remote add nss https://github.com/ACwifidude/openwrt.git
git fetch nss
git checkout kernel5.4-nss-qsdk10.0
git fetch upstream && git rebase upstream/master

My config after adding the 7 lines mentioned above.

1 Like

Nice. I’m getting similar results.

For SQM to run with the NSS cores you’ll need to run custom scripts (I have these lines on my startup script - adjust to your speed as you see fit or comment them out).

The standard SQM config settings are not fully functional. NSS cores unfortunately do not support cake but they support fq codel up to nearly line rate (~900mbps). Ex:


# Shape ingress traffic to 500 Mbit with chained NSSFQ_CODEL
tc qdisc add dev nssifb root handle 1: nsstbl rate 500Mbit burst 1Mb
tc qdisc add dev nssifb parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default

# Shape egress traffic to 34 Mbit with chained NSSFQ_CODEL
tc qdisc add dev eth0 root handle 1: nsstbl rate 34Mbit burst 1Mb
tc qdisc add dev eth0 parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default

2 Likes

I didn't realize this... I have the d/l speed for SQM set to 650000 and the upload set to 22000. What values do you recommend in the startup script to match?

Easy adjustment - just change the number in front of the Mbit for the speed you desire. NSS can do more than 650 so feel free to go higher if you have more from your ISP.

# Shape ingress traffic to 650 Mbit with chained NSSFQ_CODEL
tc qdisc add dev nssifb root handle 1: nsstbl rate 650Mbit burst 1Mb
tc qdisc add dev nssifb parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default

# Shape egress traffic to 22 Mbit with chained NSSFQ_CODEL
tc qdisc add dev eth0 root handle 1: nsstbl rate 22Mbit burst 1Mb
tc qdisc add dev eth0 parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default

my experience with NSS is that if you have 'SQM' enabled, you don't have anything at all. i think with NSS it bypasses SQM?

I tried a variety of SQM settings and didn’t notice any change... then I found out NSS bypasses SQM. :laughing:

You’ll have to run the script to get shaping. :sunglasses:

Here is the start of the discussion:

no way to get like any other sqm script, with luci integration and so on?
as far as i can remember one user claimed he did it.. and i think kong does this in his build with nss support.. am i wrong?

We just need a patch to link the two. If someone has a patch or knows a commit somewhere on github I’ll gladly cherry pick to add “NSS Fq_codel” as an option to the typical SQM page.

I don’t see any patch errors in the log. Maybe there is a new dependency for one of the packages? Master has been getting some major renovations and packages were a mess a couple days ago.

I’d start from a fresh diffconfig (followed by make defconfig to make a new .config file)

@Gram have you managed to build and run on C2600 ?

Anything in this config that could cause my NSS build not to boot?
It's the same as my normal master build config except that i added the NSS related stuff.

Been following the thread for a good while - not aware of any packages interfering with the NSS drivers. Don’t see anything obvious in your config that would cause an issue.

I purposely kept my build simple because there are bound to be conflicts. I’d remove less essential packages from the build and run a more barebones setup (that you can then add packages to via opkg) - ex- try without ethtool and extra optimizations.

Process of elimination can help narrow the field of conflicting packages - the developers could potentially find some fixes. :sunglasses:

Hi @imkebe, don't have C2600, I have only R7800.

The latest code has been compiled this morning (kernel 5.4.77) and running on my R7800.
Used the previously provided steps on a dedicated (with build tree removed before every run) VM.
I'm using Oracle Linux 7.9 (should work with RHEL or Centos the same way) to do the compile

@darksky Have you tried to simply run

make world

before the full build? If this runs successfully, your toolchain should be ok. If it fails, you need to look into your setup