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

TL;DR: unless you have a good reason (in my case I need to stick as much as possible to the standard releases, and I like to tinker and don't know what I might get into next so I need all modules around), you are probably better off with ACwifidude's builds.

Not quite. Possibly the opposite.

ACwifidude's builds:

  • have a limited (and probably reasonable) set of kernel modules built.
  • limited NSS modules built (so probably streamlined NSS code too)
  • few programs of general interest included in images, like wireguard, methinks.
  • built frequently so it has the latest branch updates
  • more like "snapshot" (even the 23.05 image given bumps in kernel version)

Builds I put out:

  • build all kernel modules, even the ones probably nobody uses (LTE adaptors... audio...)
  • as much as possible NSS modules built (which sounds like a great thing but it isn't - this is why SQM doesn't work on the 23.05.x builds and I gave up trying to figure it out)
  • as close to official release as possible as to what is included in the image... anything else has to be installed after flash or a custom image should be built with ImageBuilder... just like official images.
  • built on OpenWrt release tags so image behaves as close to official releases as possible
  • more like standard releases

I haven't built recently because building all modules is a pain. The NSS code usually requires hacking of Makefiles to get there, and then SQM acts up. I might build again once 23.05.x is final. I'm happy using 22.x versions that work well for me and I keep up to date with updates to TLS libraries and such.

Yes, as much as I've done so. The router won't brick. If were to it is easy to get back via failsafe (which I've used way to many times) using a static IP of 192.168.1.2.

Appreciate this. Able to get ~98% of my allocated speed with +0/+0 according to waveform' test, without I was ~+190/+20.

Unfortunate it's not upstream!

Just a question: Anyone know how to move the IRQ for eth off core0? Or is this hardware locked?

Are you using irqbalance?

That usually does a good job.

Below my notes about core affinity, have not used it in a long time as I rely on irqbalance

## Core Affinity

As this is a dual core CPU you can set a certain process to run on one of the two cores.

Normally the scheduler does a good job but you can manually override the core affinity.

When you run the command *cat /proc/interrupts* from the CLI (telnet) you can see which process runs on which core and what the irq number is. (For software interrupts: *cat /proc/softirqs* )

For me the eth0 process, which is the WAN, has irq 100 and runs on CPU0 (which is core 1).

Core affinity is set in the file */**smp_affinity* , this file does not have a value meaning the scheduler will take care, but if you want to associate eth0 (the WAN) with core two 2 , then put a value of 2 in that file:

*echo 2 > /proc/irq/100/smp_affinity*

Default core affinity is 3 meaning the process can run on both cores.

To see all core affinity settings:

*for IRQ in /proc/irq/*/smp_affinity; do FILE=$(cat $IRQ); echo "$IRQ = $FILE";done*

Sorry! From old testing I couldn't seem to change it with eth, but with NSS enabled it's allowed to move. What I meant to say was the two APs.

 57:   29160564          0   PCI-MSI 524288 Edge      ath10k_pci
 58:   14773062          0   PCI-MSI 134742016 Edge      ath10k_pci

Attempting to move either results in

root@R7800:~# echo 2 > /proc/irq/57/smp_affinity
ash: write error: Invalid argument

ISP is StarLink with R7800 Router. I migrated from dd-wrt in January to get better bufferbloat management via SQM.
I ran stock OpenWrt for the first 2 months using cake-autorate SQM. Recent improvements to StarLink network are getting speeds above my R7800 CPU limit of ~220mbit/s(with cake-autorate). Thus, I chose to migrate to ACwifidude 23.05 NSS build.
My CPU load during BW tests have gone from 90+% to 30-%.
Speedtests up to 240mbit/s so far. (Keep up the improvements StarLink.)

Wonderful CPU usage improvement. I am quite impressed.
My dream would be to utilize cake-autorate with an NSS enabled kernel, for the extra ping packets to tune the SQM. If NSS cores ever get enabled in stock OpenWrt kernel, this might become possible.
Great work ACwifidude !

1 Like

Your dream will never come true. NSS cores only support FQ_CODEL.

1 Like

hi @ACwifidude

do you have r7800 prebuilt binaries for download?
if i remember correctly you had those builts with all related ipks available rite?

edit ok i finally managed to find them. i followed those deprecated links above

sorry and thanks

Guru,please make the R7800 firmware package for version 23.05.3,please upgraded kernel 5.15.146-5.15.150🫶

you can dot it with that;

I'm a super noob and won't compile the firmware and upgrade the firmware kernel😭

1 Like

I see, but he wrote step by step what you need to do.

The last build from @KONG use the kernel 5.15.150 but os for openwrt 23.05

Is there anything special that I'm missing in kernels 5.15.146 or 5.15.150? Or just the assumption that newer is better?

1 Like

Boss, I want to upgrade the kernel because the update (src/gz openwrt_core https://downloads.openwrt.org/releases/23.05-SNAPSHOT/targets/ipq806x/generic/packages) of installing the plugin opkg was 5.15.150 last week, and it has become 5.15.153 these days。
Whisper a question:when are you updating GitHub APCCV/OpenWRT-23.05.3-NSS :heart_hands:

thanks!I found the download address and I'm going to give it a try。

r23821+28-77b7c10884
kernel - 5.15.153
ACwifidude's commits
Ansuel's support for QAM-256 
morse-sophronia https://github.com/openwrt/openwrt/pull/14895
Kong's config

Wired

@GXTX

# move nss cores to cpu1 and cpu2 (Qosmio's).
i=1
awk '$7=="nss"{gsub(":","");print $1,$7}' /proc/interrupts| while read num irq; do
  echo $i > /proc/irq/$num/smp_affinity
  i=$((i+1))
done

# move rpm, and usb to cpu2
awk '$7~/qcom_rpm_ack|xhci-hcd/{gsub(":","");print $1,$7}' /proc/interrupts| while read num irq; do
  echo 2 > /proc/irq/$num/smp_affinity
done
4 Likes

Is this still the way to go?
I want to replicate it for the r7800 since by the look of it you maybe moved on.

I have setup a debian build machine according to the official (outdated) instructions.

Unfortunately ipq806x NSS can’t be supported by anything after 23.05. The next stable release of OpenWrt is rumored to be branching off in the near future which was the writing on the wall that it was time to move on. I used r7800s for 5 years now and they are a solid AC router. I have moved on to the MT6000 which is a great AX device and a good upgrade. I have two MT6000s as access points and I will be replacing my main r7800 router this month with a x86 device (still shopping the options).

For the r7800 I would build using the 23.05 build. Those instructions from post #2 are correct.

Succinctly it looks like this if you want to grab a build with the latest 23.05 updates:

#step 1
git clone -b openwrt-23.05-nss-qsdk11 https://github.com/ACwifidude/openwrt.git

#step 2 copy the diffconfig to another folder then edit the diffconfig file deleting these two lines (plus all the lines for the other routers)

CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_netgear_r7800=""

# step 3 run these commands to get the latest commits from 23.05:

git reset --hard HEAD~1
git remote add upstream https://git.openwrt.org/openwrt/openwrt.git
git fetch upstream && git rebase upstream/openwrt-23.05

Step #4 copy the edited diffconfig back in to the main folder and run the following

./scripts/feeds update -a && ./scripts/feeds install -a && cp diffconfig .config && make defconfig && ./scripts/getver.sh

make -j5

Step #5
Enjoy!


2 Likes

Unfortunately in ipq806x NSS build does not work sqm (fq_codel + nss-rk) and mesh point (802.11s) together (cyclic reboot).
Are there any special options for setup?

sqm

config queue 'eth1'
        option enabled '1'
        option interface 'eth0'
        option download '97280'
        option upload '97280'
        option qdisc 'fq_codel'
        option script 'nss-rk.qos'
        option linklayer 'ethernet'
        option debug_logging '1'
        option verbosity '2'
        option overhead '44'
        option linklayer_advanced '1'
        option tcMTU '2047'
        option tcTSIZE '128'
        option tcMPU '84'
        option linklayer_adaptation_mechanism 'default'
        option qdisc_advanced '1'
        option squash_dscp '1'
        option squash_ingress '1'
        option ingress_ecn 'ECN'
        option egress_ecn 'NOECN'

mesh point

config wifi-iface 'wifinet2'
	option device 'radio0'
	option mode 'mesh'
	option encryption 'sae'
	option mesh_id 'mesh'
	option mesh_fwding '1'
	option mesh_rssi_threshold '-73'
	option dtim_period '3'
	option disassoc_low_ack '0'
	option key '1234567899oo'
	option network 'lan'

Error and reboot

Sat Apr  6 19:04:14 2024 kern.info kernel: [  249.784510] Created a NSS virtual interface for dev [nssifb]
Sat Apr  6 19:04:14 2024 kern.info kernel: [  249.790768] NSS IFB data callback registered
Sat Apr  6 19:04:14 2024 kern.info kernel: [  249.795799] NSS IFB transmit callback registered
Sat Apr  6 19:04:14 2024 kern.info kernel: [  249.800436] NSS IFB module loaded.
Sat Apr  6 19:04:15 2024 kern.warn kernel: [  249.900547] __nss_qdisc_init[2175]:parent (65536) and TC_H_ROOT (-1))
Sat Apr  6 19:04:15 2024 kern.warn kernel: [  249.900560] __nss_qdisc_init[2176]:root->ops->owner (00000000) and THIS_MODULE (bf7d1600))
Sat Apr  6 19:04:16 2024 kern.warn kernel: [  249.900589] __nss_qdisc_init[2177]:NSS qdisc c6de3c00 (type 1) used along with non-nss qdiscs, or the interface is currently down
Sat Apr  6 19:04:16 2024 kern.info kernel: [  250.914896] b4b46425: Found net device [eth0]
Sat Apr  6 19:04:16 2024 kern.info kernel: [  250.925628] b4b46425: Net device [eth0] has NSS intf_num [1]
Sat Apr  6 19:04:16 2024 kern.info kernel: [  250.931652] Nexthop successfully set for [eth0] to [nssifb]
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.835913] NSS core 0 signal COREDUMP COMPLETE 4000
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.835955] bf2dd400: Starting NSS-FW logbuffer dump for core 0
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.839944] bf2dd400: Warn: trap[813]: Trap on CHIP ID 00050000
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.845659] bf2dd400: Warn: trap[620]: Trapped: TRAP_TD(00000004) DCAPT(3C000080)
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.851556] bf2dd400: Warn: trap[645]: Trapped: Thread: 2, reason: 00000020, PC: 4002FBF4, previous PC: 4002FBF0
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.859189] bf2dd400: Warn: trap[594]: A0_3: 4AEDEEA4 402322D8 3F017E90 4AEDEEA6
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.869425] bf2dd400: Warn: trap[594]: A4_7: 4AEDEEA6 40053D04 3F017E90 3F00AEF0
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.876798] bf2dd400: Warn: trap[599]: D0_3: 00000026 00000006 00000009 4AEDEE94
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.884201] bf2dd400: Warn: trap[599]: D4_7: 00060000 00000026 2EC9C0AA 000005DC
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.891583] bf2dd400: Warn: trap[599]: D8_11: FFFFFFFF C0A8018D 4DC60940 00000000
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.898888] bf2dd400: Warn: trap[599]: D12_15: 00000000 00000000 00D84001 00003C00
Sat Apr  6 19:05:07 2024 kern.alert kernel: [  301.906319] bf2dd400: Warn: trap[649]: Thread_2 has non-recoverable trap
Sat Apr  6 19:05:07 2024 kern.err kernel: [  301.914237] phy0-ap0: NSS TX failed with error: NSS_TX_FAILURE_NOT_READY
Sat Apr  6 19:05:07 2024 kern.err kernel: [  301.920601] phy0-ap0: NSS TX failed with error: NSS_TX_FAILURE_NOT_READY
Sat Apr  6 19:05:07 2024 kern.err kernel: [  301.927361] phy0-ap0: NSS TX failed with error: NSS_TX_FAILURE_NOT_READY
client_loop: send disconnect: Broken pipe

802.11s and NSS are incompatible. If you attempt to build an NSS image with mesh11sd, the compilation process always fails.