IPQ806x NSS Drivers

i was also in the same exact boat, then i had random packet loss from all clients, nothing in the logs at all besides the same ath10k client error i get even with -ct/-ct-htt drivers/firmware

i could probably change the xr500 dts(same device as r7800 almost) to work with this, to test wifi speeds with that

@quarky i did a make clean and now i get

Package kmod-qca-ssdk-nohnat is missing dependencies for the following libraries:
nf_conntrack.ko
ppp_generic.ko

from the same config i used to build in the 1st place(built fine) and from your config.seed
a clean repo is the same outcome

@ratking the error is strange. The QCA SSDK (nohnat) package Makefile did not even specify any dependencies other than platform restrictions. It should not have resulted in the dependencies errors you saw.

Maybe you should try:

make distclean
make package=R7800 -j4

The above should clean out everything and start fresh.

Good that it's stable for you. I think 220Mbps for a 1 stream client looks about right. My iPhone, which is a 2x2 client, 866Mbps PHY rate, maxes out at around 550 Mbps. Unfortunately I do not have any 3x3 or 4x4 WLAN clients to test out.

I own both a Samsung Galaxy S10e and a R7800, with a 1 Gbps internet connection, and I'd be willing to help test the scenario when using a 4x4 client.

EDIT: Well, apparently the 4x4 MIMO is for LTE only. The WiFi chip is 2x2 MIMO, so that's a bust, but I'm willing to help in other areas.

Thank you. I notice that the sysupgrade file is a .tar file and when I try to upload it I get the message: "The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform. Select 'Force upgrade' to flash the image even if the image format check fails. Use only if you are sure that the firmware is correct and meant for your device!"

Is this correct?

@dannil Any test on stability of the firmware would be welcomed. We need all the feedbacks that we can get. So far the NSS drivers seems working well for me for both wired and wireless network.

@Videopac The sysupgrade .tar file is meant for upgrading from lede-17.01 firmware. If you're running stock, openwrt 18.06/19.07/master, you cannot use the .tar file. You need to go the tftp route.

Seems pretty stable I will run it for a while. I did put the cpu frequency im my startup rc.local no issues or crashing so far. I only have 2x2 wifi clients though so about 500Mb down there. Ethernet https://www.speedtest.net/my-result/d/1a9c4094-8da7-4f9a-9ede-2b2cba0b17bc

I uploaded a new test build yesterday with the kernel upgraded to v4.4.184. I would suggest that you flash your R7800 with the latest build as there are some security fixes incorporated into v4.4.184 kernel.

Yes that's the kernel I have. I installed irqbalance and set it in rc.local and turned on sqm piece of cake.

Thank you. Wouldn't it be easier for me to load the factory.bin and then upload my settings? Does the factory.bin have wifi and or luci active by default?

Yes, that would be best. My firmware image has luci installed, so it'll be easier to use once installed.

Remember to apply the command to force the NSS core frequency to a fix value, or your R7800 will not be stable. The command is stated in the readme text file included in my Box uploads.

Sorry for being noob, but could you explain this point?
i mean, for what i had understood, the offloading is something to speed up transfers, but if with NSS cores we have an amazing routing performance, what is working and what is not? what are we missing?

Sadly i had to go back to an actual master (for some needed packages not available on 17.01), but can't wait having this magic on new kernels :slight_smile:

Apologies for being contradictory in my posts. What I meant was that at the moment, full WiFi offload cannot be achieved for my builds, but we have partial offloads done by the NSS firmware.

Stock firmware has proprietary qca9984 drivers that integrates fully with the NSS firmware. If I'm not wrong, the stock driver is not a mac80211 driver. For lede/openwrt, all ipq806x firmware uses the open source ath10k driver that is based on mac80211 framework.

My firmware build for the R7800 patched the mac80211 subsystem to registers all wireless interfaces with the NSS firmware, thus making all WiFi network packets flowing through the NSS firmware. This has the effect of offloading the netfilter checks to the NSS firmware, and thus 'accelerating' WiFi traffic.

In any case, my firmware build is fully functional. I think WiFi should achieve close to 1gbps speed if tested using a 3x3 or 4x4 client. If you're willing to try out my firmware builds for the R7800 and you have a 3x3 or 4x4 WiFi client, would appreciate if you can help test out the max speed for WiFi clients.

Thanks.

1 Like

Btw, what is the package that you needed that's available in master but not in the 17.01 branch?

IMHO, irqbalance is not necessary. What I did was to move the wlan interrupts to core 1 and it should be enough. Interrupts caused by network load will be negligible when the NSS firmware takes over routing tasks. Below is the /proc/interrupts output of my R7800:

           CPU0       CPU1       
 16:    1340594    9879272       GIC  18 Edge      gp_timer
 18:         41          0       GIC  51 Edge      qcom_rpm_ack
 19:          0          0       GIC  53 Edge      qcom_rpm_err
 20:          0          0       GIC  54 Edge      qcom_rpm_wakeup
 26:          0          0       GIC 241 Edge      29000000.sata
 27:         23    3866216       GIC  67 Edge      qcom-pcie-msi
 28:         23    6246129       GIC  89 Edge      qcom-pcie-msi
 29:     169759          0       GIC 202 Edge      adm_dma
 32:   26894177          0       GIC 245 Level     nss
 33:          0     331486       GIC 264 Level     nss_queue1
 34:    8120634          0       GIC 246 Level     nss
 35:          0          0       GIC 265 Level     nss_queue1
 36:          0          0       GIC 130 Level     bam_dma
 37:          0          0       GIC 128 Level     bam_dma
 44:          2          0   msmgpio   6 Edge      gpio-keys
 92:          2          0   msmgpio  54 Edge      gpio-keys
103:          2          0   msmgpio  65 Edge      gpio-keys
107:          0          0   PCI-MSI   0 Edge      aerdrv
108:         23    3866216   PCI-MSI   1 Edge      ath10k_pci
140:          0          0   PCI-MSI   0 Edge      aerdrv
141:         23    6246129   PCI-MSI   1 Edge      ath10k_pci
173:         10          0       GIC 184 Level     msm_serial0
174:          2          0       GIC 187 Level     1a280000.spi
175:          0          0       GIC 142 Level     xhci-hcd:usb1
176:       6734          0       GIC 237 Level     xhci-hcd:usb3
IPI0:          0          0  CPU wakeup interrupts
IPI1:          0          0  Timer broadcast interrupts
IPI2:    1096343    6110068  Rescheduling interrupts
IPI3:          0          0  Function call interrupts
IPI4:     882824     931697  Single function call interrupts
IPI5:          0          0  CPU stop interrupts
IPI6:          0          0  IRQ work interrupts
IPI7:          0          0  completion interrupts
Err:          0

Also, you may want to check that SQM is working. From what I understood, the Linux stack's qdisc will be bypassed if the NSS firmware takes over the network interface's routing duty. So your cake SQM settings may not be working as you intended it to.

At the moment, I manually changed the network interface's qdisc settings to those provided by the NSS firmware. Below are the 'tc qdisc show' output of my R7800:

qdisc noqueue 0: dev lo root refcnt 2 
qdisc nsscodel 1: dev eth0 root refcnt 2 target 5.0ms limit 10240p interval 100.0ms set_default accel_mode 181 
qdisc nsscodel 1: dev eth1 root refcnt 2 target 5.0ms limit 10240p interval 100.0ms set_default accel_mode 181 
qdisc noqueue 0: dev br-lan root refcnt 2 
qdisc nsscodel 1: dev wg0 root refcnt 2 target 5.0ms limit 10240p interval 100.0ms set_default accel_mode 181 
qdisc nsscodel 1: dev wg2 root refcnt 2 target 5.0ms limit 10240p interval 100.0ms set_default accel_mode 181 
qdisc nsscodel 1: dev wg1 root refcnt 2 target 5.0ms limit 10240p interval 100.0ms set_default accel_mode 181 
qdisc nsscodel 1: dev wg3 root refcnt 2 target 5.0ms limit 10240p interval 100.0ms set_default accel_mode 181 
qdisc fq_codel 0: dev pppoe-wan root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn 
qdisc fq_codel 0: dev tun0 root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5.0ms interval 100.0ms ecn 
qdisc nsscodel 1: dev wlan1 root refcnt 5 target 5.0ms limit 10240p interval 100.0ms set_default accel_mode 181 
qdisc nsscodel 1: dev wlan0 root refcnt 5 target 5.0ms limit 10240p interval 100.0ms set_default accel_mode 181

I'm only applying qdisc for egress traffic. No ingress shaping at the moment.

1 Like

luci-ssl-nginx (and the connected packages, obviously..)
i need nginx and ssl because my router is proxying all the connections to local devices..
In the dedicated topic i was told those packages are not available for old 17.01, so i went back to an actual master :slight_smile:

@quarky, I compiled a fireware from your source and flashed my r7800. I can see the nss driver was loaded in the kernel log.
All things work well except the stongswan vpn. I set up the vpn server followed this tutorial.
IPsec Road-Warrior Configuration
It worked like a charm before but now I can get a virtual ip from my router with no traffic pass through the vpn.

I don’t use IPSec server so I’m not sure how I can help troubleshoot. What I know is that IPSec traffic should pass thru without issue as my iPhone’s WiFi calling is working, and it uses IPSec.

Since you can connect to your router’’s IPSec server and managed to get an IP, it looks like traffic is flowing thru the NSS firmware. I suspect you could be seeing firewall issue.

Do you see any errors logged?