IPQ806x NSS Drivers

@Videopac give a look here :slight_smile:

1 Like

ok my build failed with a not-so-clear message :frowning:

include/toplevel.mk:205: reciipe for target 'world' failed
make: *** [world] Error 1

sad :frowning:

Your clues will be (potentially quite a bit-) above this final exit statement.

Well, not much. It just says to make with the verbose option to understand what is happening.. tomorrow :wink:

Apologies for interjecting in this thread but would you mind sharing a link that describes how to do this or posting your method (for the r7800)? No worries if your too busy or uninterested...

EDIT the closest I've found so far for the r7500v2 is here. I'm looking for other examples before I try it...

Too complicated. Here's what I do to test builds without flashing it into my R7800 NAND flash:

  1. Before you start, you need to setup your computer as a TFTP server, and copy the initramfs image into the TFTP server's root directory. Let's assume that the name of the initramfs image is called 'lede-nss.bin'. Name of the file is not important.

  2. Connect your computer's ethernet port to one of the LAN ports of your R7800. Assign a fixed IP to your computer's ethernet port connected to the R7800. The IP must be in the 192.168.1.0/24 segment and not 192.168.1.1, as this IP is used by the R7800 when it's booted into U-Boot. Let's assume the IP assigned to your computer is 192.168.1.100.

  3. Connect your R7800 serial port to your computer so that you can see the R7800 console output and power on your R7800. You should see the R7800's U-Boot booting via the serial console.

  4. Interrupt U-Boot by pressing any key (in the serial console) when prompted. You have only 2-3 seconds before U-Boot proceeds to boot from the NAND flash.

  5. Wait a while (say 3-5s after step 4.) for the R7800 to setup it's LAN port. Load the initramfs image into your R7800 by keying this command into your R7800 serial console:

tftpboot 50000000 192.168.1.100:lede-nss.bin

  1. You should see some activity in the serial console while the image loads via the LAN port. Once loading completes and the serial console command prompt returns, issue this command to boot the image loaded into the R7800's memory:

bootm

You should see the Linux kernel booting into lede/openwrt at this point.

Give it a try.

5 Likes

This from a clean clone of my repo? This is odd.

Was there any change to the repo source after you cloned and switch to the lede-17.01-ipq806x-nss branch?

Maybe you should try the build an image without any changes first and do the change one at a time to see which change broke the build?

Could also be build dependency not satisfied. world is the first step of the build and it failed. Have you successfully built any firmware images in your build environment?

Thank you. I've been itching to try out my new usb tty serial adapter so I will definitely give it a go.

I'm looking at choosing the memory load address for my device (50000000 in your example). I see examples of using printenv loadadr once I'm into the bootloader. I'll poke around the memory layout while I'm there as well.

I like this thread but toying with the nss binary blob with out formal documentation is too advanced for me atm. Good luck.

well yes, i build my images (based on hnyman's builds)
i'll try cloning back from the beginning.. let's see :slight_smile:

I put it on a completely idle R7800. Uptime 11h. Keep you updated!

could you make some speedtest?
what line do you have?

Did you force the NSS core to a fixed frequency? If not, and the R7800 is idling, you likely will not trigger the bug that crashes the NSS firmware which will result in a spontaneous reboot. The R7800 has to be cycling the NSS core CPU frequency up and down to trigger the bug, and the only way it will do that is if the NSS firmware is servicing bursty network traffic periodically. From what I observed, any bandwidth below 100mbps will not make the NSS CPU scale up and stays at it's nominal 110MHz.

If the R7800 if constantly busy or always idling, the NSS CPU core will likely be on a fixed frequency and thus it will appear to be stable.

No.

What kind of load is required? I use it as simple AP. Or I can configure it a Router, but without PPPoE.
My Internet-Uplink is 100/40 only.

It's good to test all use cases. Let's leave it and see if it's stable acting as an AP.

Also, if you have a 3x3 or 4x4 WiFi client, do you mind testing the WiFi thruput. I think my firmware running in the R7800 should be able to do close to 1gbps with 3x3 or 4x4 WiFi clients. Can use file transfer between WiFi client and client connected to the LAN port.

Thanks.

Hi folks,

Happy to report that qdisc with the NSS firmware appears to be working in offload mode. At the moment, I'm playing around with qdisc using a patched version of the 'tc' utility.

Unfortunately, it appears that it can only be used with the gmac, bridge and wireless interface. It doesn't work with tunnel interfaces like OpenVPN or WireGuard, bummer. This may be 'fixable' tho. Need to look into the driver source code.

Also, another negative is that the newer qdiscs algo (e.g fq_codel, cake) are not implemented. The following are the qdiscs that are available:

nssbf
nssbfifo
nssblackhole
nsscodel
nsshtb
nsspfifo
nssprio
nssred
nsstbl (tbf?)
nsswfq
nsswrr
nsswed

Next step would probably be enhancing Luci SQM scripts to support the NSS qdiscs.

2 Likes

Hi quarky,

I have performed some Ethernet --> Wifi throughput tests some weeks ago, using a compiled image based on your git repo and running on a R7800.

My setup was:
Laptop (Intel core i7) with an Asus AC68 3x4MIMO Wifi USB dongle <-> Wifi (channels 100,104, ~1 meter distance with LOS) R7800 Eth1 <-> Ethernet cable <-> Desktop PC (Intel core i7)

To exercise the link, I used Iperf3, setting a client and server instance on each endpoint (so proper tests could be performed according the desired flow direction - I prefer to do this explicitly than using the -R option).

I have only conducted TCP tests (as that was my main interest for another scenario); I may have to also perform some UDP tests very soon to establish some comparative measures with another custom IPQ8065 platform.

Iperf3 options used according running instance:

  • server: -s -i 1
  • client: -c <ip address> -w 200M -t 600

My results:

  • laptop (iperf client) --> desktop pc (iperf server)

    • throughput: ~728 to ~783Mbits/s
    • idle: ~45% to ~49%
    • sirq: ~50%
  • laptop (iperf server) <-- desktop pc (iperf client):

    • throughput: ~536 to ~602Mbits/s
    • idle: ~48% to ~65%
    • sirq: ~32% to ~43%

Although I have clear the IPTables rules and force a specific NAT configuration, these results should be achieved even without performing those changes (at least on my quick tests at that time, I didn't spot any difference).

I am not mentioning all configurations or my considerations on my tests but this should give you a pretty good idea of what the system is able to achieve. On my tests, to avoid the NSS throttling, I was forcing its frequency to be always 800MHz (I didn't spot the reboot on this scenario but I have experienced it while not forcing this setting - but because I apply strict configurations to optimize and ensure same configuration on all tests and between platforms, it was hard to say the reboot was caused by the NSS throttling).

With enough free time (which is something complicated in my case), I could help you testing and integrating the remaining qca-nss modules (I am performing this integration for a custom IPQ8065 platform).

Kind regards

1 Like

@sjuliao would you mind compiling the latest source from my GitHub repo and try again? Not sure if the version you tested had the NSS integration for the mac80211 module. I remember pushing the codes for that upstream only last week?

Also, you should switch the ath10k IRQs to CPU1 if your previous test are only stressing CPU0.

Finally for iperf3, could you test with multiple streams, e.g. using -P2 switch? I found that using multiple streams can increase the thruput during my tests using LAN - WAN tests.

Thanks for sharing your tests results.

Hi quarky,

Following you recent post, I have just notice, I used the "lede-17.01-quarksg-qca-nss" branch instead of the more recent suggested branch...so my test results may be totally incorrect.

I did not spent too much time inspecting your build at that time as I am integrating NSS for a different platform with a different 11ac&11ad radio - and this requires me to change the 11ad driver at least to benefit from NSS), mainly following codeaurora repo...but I was confused and suspicious because, although the throughput seen on those tests was not bad and I could see some performance improvement of using NSS, the number of packets processed and the sirq didn't met my expectations or what is announced in some documentation... But, as I said I didn't spent time checking your NSS integration: I noticed that you only had a few qca-nss modules integrated and that the mac80211 had at least the flag NSS_SUPPORT enabled (although that high level of sirq seems odd).

When I get some time, I will re-branch and compile a new image based on your more recent "lede-17.01-iq806x-nss" branch and retest.

Kind regards

hello,
i tried again a build with no modifications, and eventually i reached the end of the compile :slight_smile:
i was used to find a "sysupdate" image (bin format), but in my case i only got only a tar file for sysupgrade.
Sorry for being noob: can i use that file to update the router? :slight_smile:
Thanks

Yes, you can use the .tar to upgrade.