Ipq806x NSS build (Netgear R7800 / TP-Link C2600 / Linksys EA8500)

Yeah i still remember a post with @quarky about the speed of it and some issue with frequencies hence it is locked 800mhz. But i have another question.
Now i'm doing a bit of work with the SQM package trying to add in the requirements for NSSFQ_Codel, but i now getting errors which show signs of IPT issue. Now i found out that kmod-sched is missing....
Now the problem: kmod-sched is available in the list but can't be installed because of kernel difference.
Oh oh??

Yeah coming back to that soon sorry :stuck_out_tongue: i have been testing this all out myself and seem to have gotten in an error loophole/problem regarding sqm over nss.
Yes the results you have are similar to me with my upload being shaped but not my ingress(download)? BUT yeah, some issues going on right now.

So to get to the problem this is what i pulled out of syslog:

Thu Nov 25 16:51:44 2021 user.notice SQM: Starting SQM script: nss.qos on eth0, in: 20480 Kbps, out: 20480 Kbps
Thu Nov 25 16:51:44 2021 daemon.err modprobe: failed to find a module named act_ipt
Thu Nov 25 16:51:44 2021 daemon.err modprobe: failed to find a module named sch_fq_codel
Thu Nov 25 16:51:44 2021 daemon.err modprobe: failed to find a module named act_ipt
Thu Nov 25 16:51:44 2021 daemon.err modprobe: failed to find a module named sch_fq_codel
Thu Nov 25 16:51:44 2021 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (2): /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 0 u32 match ip protocol 1 0xff flowid 1:13
Thu Nov 25 16:51:44 2021 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: Not supported We have an error talking to the kernel
Thu Nov 25 16:51:44 2021 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (2): /sbin/tc filter add dev eth0 parent 1:0 protocol ipv6 prio 1 u32 match ip protocol 1 0xff flowid 1:13
Thu Nov 25 16:51:44 2021 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: Not supported We have an error talking to the kernel
Thu Nov 25 16:51:44 2021 user.notice SQM: WARNING: sqm_start_default: nss.qos lacks an egress() function
Thu Nov 25 16:51:44 2021 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (1): /sbin/tc qdisc add dev nssifb root handle 1: nsstbl rate 20480kbit burst 1Mb
Thu Nov 25 16:51:44 2021 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: Cannot find device "nssifb"
Thu Nov 25 16:51:44 2021 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (1): /sbin/tc qdisc add dev nssifb parent 1: handle 10: nssfq_codel limit 4096 flows 1024 quantum 1514 target 5ms interval 100ms set_default
Thu Nov 25 16:51:44 2021 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: Cannot find device "nssifb"
Thu Nov 25 16:51:44 2021 user.notice SQM: ERROR: cmd_wrapper: ip: FAILURE (1): /sbin/ip link set up nssifb
Thu Nov 25 16:51:44 2021 user.notice SQM: ERROR: cmd_wrapper: ip: LAST ERROR: Cannot find device "nssifb"
Thu Nov 25 16:51:44 2021 user.notice SQM: WARNING: sqm_start_default: nss.qos lacks an ingress() function
Thu Nov 25 16:51:44 2021 user.notice SQM: nss.qos was started on eth0 successfully

While clearly in the script i provided there is ingress/egress and also:

failed to find a module named act_ipt
failed to find a module named sch_fq_codel

What exactly is going on here :scream: that is not normal behavior...

--EDIT:
Okay i found the issue and resolved it!
First go to: /usr/lib/sqm

cd /usr/lib/sqm

Then remove defaults.sh with:

rm defaults.sh

Then copy/paste this in command line:

wget https://github.com/BlackBookOfficial/SQM/raw/main/defaults.sh

Now do:

rm nss.qos

Then copy/past this in command line:

wget https://github.com/BlackBookOfficial/SQM/raw/main/nss.qos

Reboot your router, make sure that sqm is enabled then do the test.
My result so far:

With these settings:

Good luck and happy testing!

2 Likes

Hmm...weird. I did exactly what you wrote, but still it does not reading ingress value... what am I missing?
obraz

Interface name - should be WAN or eth0 ?
Governor settings or performance ?

Your results in bufferbloat are amazing!! :slight_smile: I hope it will work on mine as well. Did you try afterward to set ingress on 600-700mbps ?
Thanks in advance for your reply.

Keep it on eth0 as eth0 is linked to eth0.1 which should be "wan,wan6".
I suggest running in performance over demand for full performance on the maincore side too.

I came to a full on stop at the moment.
There is some weird things happening right now with the whole sqm setup.
All i can say now is, that the startup script 100% is easier and faster but would require a reboot to work.
With this current sqm setup you have to set values save/apply then reboot to make it work at the given values, which is not what should happen with SQM. So i'm gonna have to do some research on this whole thing, figuring out how to properly do everything without causing errors and stress.

I did not try SQM at high rates as of yet because SQM at gigabit wan is basically pointless, unless you are trying to squeeze out a single ms of latency.

By the way the nss.qos you have linked was copied from my repo and is not up to date, I recently added a few fixes after dtaht looked at my flent results.

Latest is here: https://github.com/ricsc/sqm-scripts/blob/ipq806x_nss/src/nss.qos

For a custom build one just needs to edit sqm-scripts Makefile, as mentioned here:

Yes indeed, but i have so much things open i get lost too easily.
Plus your file got some confusing parts which i don't quite understand which is for example:

IFACE=eth0

You had it in the older version too, which forces the tables to only work for eth0 which i'm confused about.
What if someone for example wants to offload to a custom interface or had a different name other than eth0?

--EDIT:
Yeah i'm blind and been up for way to long that i don't see clearly anymore :joy:
I see that it is hardcoded now.

So it worked I think :slight_smile:

I tried also nss.qos file provided by @KONG but I got really bad values there.
You said that during more test it causes some issues? I think it's enough test for today and I will try to make some new one tomorrow. Once again big THANK YOU for the support so far :slight_smile:

The one provided by @KONG actually works better in a way that it still spits out errors but at least you can change the speeds on the go without the requirement of rebooting the router.

So i guess i will look into @KONG his repo see what i can do there and continue research from there.

1 Like

Yep that is one of the things fixed, being able to change things without reboot, but also using dynamic burst and limit setting based on up/down which was hardcoded before and were not optimal. Current nss.qos with nss_fq_codel now performs as good as normal fq_codel, but is able to shape 900Mbps without load on the cpu. It does not set up different classes yet, which could further improve things for special workloads.

Hi,
Actually you are right. Today I made few more test and set ingress/engress to - 300/36mbps and it looks like below:

I'm just thinking if it's possible to achieve A+ and 0 latency on those kind of bandwith :slight_smile:
Does this script nss.qos is the best possible way to get low latency gaming? Or I should look somewhere else? I noticed than if I leave this untouched and save the previous startup script I'm getting better or very similar stats to those which I sent :slight_smile:

1 Like

Hi @ACwifidude ,

A bit noobish question I'm afraid, I've been browsing the whole topic but did not find the answer (or recognise it!). In the end of 2020 it was discussed to bring NSS to master (and so all OpenWrt builds I guess) but apparently this did not happen.

I'll like to have NSS for speed, and don't need SQM at the moment. Is it possible to add/install the configuration and necessary components to another build? Or is it that complex that this is not possible. I'm on @hnyman 's build at the moment.

There is not much difference between @hnyman build and this one when you only care about speed.
This build from what i have seen also has fast-path for cpu related workloads and obviously this one has the NSS package for offloading to NSS which is in all ways better than fast-path.

Thanks, somewhere halfway in this topic I've read this is/was a minimalistic build ...
I need an alround build, robust for daily workdays, preferrably with extra speed, and am a bit worried this is a speed-only build.
Also trying to understand how NSS works. As you notice, even after reading the topic, I don't have a clue :wink: And why this hasn't become mainstream, and other builders do not incorporate it.

This is a minimalistic build in regards of having only a few packages pre-installed, but you obviously could setup packages yourself as well.

What i believe towards why they do not include it, is because there is very minimal knowledge around NSS, there is no firmware code or any kind of documentation regarding the NSS cores.
Everything that currently is provided regarding NSS packages is very hacky and probably and most likely is very incomplete or not accurate but working.

No builder would implement something that is very hacky and without any form of documentation when it comes to updating, as you can see with the conversion to kernel version 5.10. It requires a whole lot of thinking figuring out and a whole bunch of debugging.
Next to that, NSS is private sourced/licensed in a way that what ever we are doing here is technically not allowed. Another issue is that the current process is build around bin. Plus there is no way to access the bins. Even if we manage to get access to the bins and get all contents out, from this moment we would be participating to illegal practices. Since we are not allowed to modify/edit/do anything with the bins/source code. Yes... Some bullshit licensing problems....

My perspective around it:
What the university has figured out with NSS is amazing, i understand it is patented etc... etc...
But now we are so far ahead in time that qualcomm doesn't even use the NSS cores anymore in their newer products which makes NSS deprecated in some forms of ways?????????? Anyhow...
I personally think that qualcomm should just push out the code of the firmware/etc just so we can improve and push the NSS to it's maximum limits and see what we can do more with it.
But that is obviously my opinion/perspective to NSS.

1 Like

0 induced latency and jitter is impossible, ok? That said, I'm a bit puzzled at it being > 10ms. What sort of connection is this, and could you either take a packet capture or hit it with flent?

Also how waveform calculates low latency gaming is wrong. They are right in saying that if the latency is over 50ms to the gaming server your gaming performance will degrade, but here that's the baseline latency to the cloudflare CDN itself is 35ms. Jitter matters more, but that's not factored into this calculation as much.

What has qualcomm replaced the NSS with in later devices?

2 Likes

Cortex processors.

1 Like

Yay! A real toolchain, good compilers, they might even have support for saturating math? Who do I beg at qualcomm for a devkit so we can implement cake?