IPQ806x NSS Drivers

From what I can piece together, NSS firmware generates interrupts for all task completions. The qca-nss-drv handles the generic interrupt and calls the callback function that’s registered, be it network or crypto. ‘Polling’ in the NSS context basically made the code synchronous, but it is still polling a semaphore that’s set by the interrupt routine.

NSS has 4 crypto engines that can operate concurrently. For CBC mode, you’re constrained to using only one engine due to IV. For ECB you can likely increase thruput by shooting encryption/decryption requests asynchronously 4 at a time and wait for completion.

I had some time to do some comparing between my almost refactored crypto-cfi and the patched version that we started with.
The bad news:
I can't do a cryptsetup comparison because the original version is not able to do that. Just adding the multi-buffer patch is not enough to make that work.
Because other parts needed to be reworked I can't even do a "simple" tcrypt comparison because it will fail on setkey().

Tomorrow I should have more time to a an ipsec / iperf3 comparison.
So I ran a few openssl speed tests to compare:

Software:

openssl speed -elapsed -evp aes-128-cbc
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-cbc      49761.98k    63443.69k    70123.26k    72118.95k    72359.94k    72253.44k

openssl speed -decrypt -elapsed -evp aes-128-cbc
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-cbc      43573.22k    56257.22k    78867.37k    85830.31k    87638.02k    87823.70k

openssl speed -elapsed -evp aes-128-cbc -multi 2
evp              99853.56k   127306.69k   140710.83k   144621.91k   145342.46k   145353.39k

openssl speed -decrypt -elapsed -evp aes-128-cbc -multi 2
evp              86412.05k   111478.19k   156522.15k   171507.71k   175535.45k   175991.47k

openssl speed -elapsed -evp aes-128-ctr
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-ctr      55803.39k    78668.46k    88539.39k    96250.54k    98462.38k    98664.45k

openssl speed -decrypt -elapsed -evp aes-128-ctr
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-ctr      53825.58k    76369.02k    87344.73k    95632.04k    98112.85k    98271.23k

Hardware: (via devcrypto) my version with scatter-gather non copy if possible.

openssl speed -elapsed -evp aes-128-cbc -engine devcrypto
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-cbc         52.75k      211.67k      846.17k     3278.17k    24419.83k    42910.74k

openssl speed -decrypt -elapsed -evp aes-128-cbc -engine devcrypto
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-cbc         53.41k      202.88k      973.48k     3645.78k    25893.84k    44921.75k

openssl speed -elapsed -evp aes-128-cbc -engine devcrypto -multi 2
evp                104.32k      406.53k     1721.57k     6663.88k    44990.24k    75788.33k

openssl speed -decrypt -elapsed -evp aes-128-cbc -engine devcrypto -multi 2
evp                109.94k      428.12k     1745.17k     7128.62k    50434.23k    89438.01k

openssl speed -decrypt -elapsed -evp aes-128-ctr -engine devcrypto
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-ctr        121.00k      249.43k      989.10k     3904.21k    26521.26k    49398.58k

openssl speed -elapsed -evp aes-128-ctr -engine devcrypto
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-ctr        121.04k      244.96k     1004.39k     3901.13k    26567.83k    49661.60k

openssl speed -elapsed -evp aes-128-ctr -engine devcrypto -multi 2
evp                213.96k      437.64k     1753.99k     6726.89k    48264.09k    85366.10k

openssl speed -decrypt -elapsed -evp aes-128-ctr -engine devcrypto -multi 2
evp                213.27k      420.05k     1743.28k     6888.20k    50283.54k    86763.42k


Hardware: (quarky):

openssl speed -elapsed -evp aes-128-cbc -engine devcrypto
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-cbc         56.94k      223.91k      891.65k     3508.91k    23863.30k    41970.35k

openssl speed -decrypt -elapsed -evp aes-128-cbc -engine devcrypto
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-cbc         51.18k      203.24k      836.95k     3235.16k    22645.42k    41194.84k

openssl speed -elapsed -evp aes-128-cbc -engine devcrypto -multi 2
evp                103.22k      407.98k     1637.29k     6492.16k    45323.61k    77960.53k

openssl speed -decrypt -elapsed -evp aes-128-cbc -engine devcrypto -multi 2
evp                108.04k      432.49k     1628.84k     6727.68k    45771.43k    77758.46k

openssl speed -elapsed -evp aes-128-ctr -engine devcrypto
aes-128-ctr        106.15k      207.64k      821.67k     3349.50k    23412.74k    40479.40k

openssl speed -decrypt -elapsed -evp aes-128-ctr -engine devcrypto
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-128-ctr        116.31k      239.21k      962.73k     3695.99k    24199.17k    43472.21k

openssl speed -elapsed -evp aes-128-ctr -engine devcrypto -multi 2
evp                214.05k      422.40k     1649.15k     6851.58k    45361.83k    78572.20k

openssl speed -decrypt -elapsed -evp aes-128-ctr -engine devcrypto -multi 2
evp                203.67k      410.18k     1618.60k     6446.42k    46320.30k    76207.45k

All the added code to make the driver pass all the extended fuzz tests didn't affect performance but did make the driver scatter/gather (multi buffer) expect for CBC-encrypt... which I'm almost sure there must be a way to reuse the IV from the previous operation.

The other bad: neither version is good enough to even come close to software crypto when its needed from userspace (openssl / ssh / openvpn etc.).

Lets see tomorrow how ipsec holds up: authenc(hmac(sha x), cbc/ctr aes). I did find OpenSwan code from 2017 with all the KLIPS code so maybe there is an "easy" way to add ipsec offload to the nss core via an virtual interface.

1 Like

There are two ways to get GCM to work in combination with the nss-crypto:
1: Use a bounce buffer to the destination scatterlist: this kills performance to the point that it is faster with blocks greater than let's say 4096 bytes.

2: Hack (patch :wink: ) the mainline gcm.c to add padding to the internal structures to get them cache-line aligned. This options is below: and seems also not very useful even from kernel space as the tcrypt results show :cry:

[  154.174293] 
[  154.174293] testing speed of rfc4106(gcm(aes)) (rfc4106(gcm_base(ctr(aes-generic),ghash-generic))) encryption
[  154.174402] test 0 (160 bit key, 16 byte blocks): 
[  154.174679] 1 operation in 120 cycles (16 bytes)
[  154.189402] test 1 (160 bit key, 64 byte blocks): 
[  154.189739] 1 operation in 162 cycles (64 bytes)
[  154.198775] test 2 (160 bit key, 256 byte blocks): 
[  154.199434] 1 operation in 330 cycles (256 bytes)
[  154.208149] test 3 (160 bit key, 512 byte blocks): 
[  154.209217] 1 operation in 544 cycles (512 bytes)
[  154.217698] test 4 (160 bit key, 1024 byte blocks): 
[  154.219593] 1 operation in 974 cycles (1024 bytes)
[  154.227720] test 5 (160 bit key, 2048 byte blocks): 
[  154.231257] 1 operation in 1830 cycles (2048 bytes)
[  154.237429] test 6 (160 bit key, 4096 byte blocks): 
[  154.244375] 1 operation in 3635 cycles (4096 bytes)
[  154.248445] test 7 (160 bit key, 8192 byte blocks): 
[  154.262009] 1 operation in 6998 cycles (8192 bytes)
[  154.266229] testing speed of gcm(aes) (gcm_base(ctr(aes-generic),ghash-generic)) encryption
[  154.270687] test 0 (128 bit key, 16 byte blocks): 
[  154.270912] 1 operation in 103 cycles (16 bytes)
[  154.285445] test 1 (128 bit key, 64 byte blocks): 
[  154.285753] 1 operation in 147 cycles (64 bytes)
[  154.294816] test 2 (128 bit key, 256 byte blocks): 
[  154.295444] 1 operation in 315 cycles (256 bytes)
[  154.304220] test 3 (128 bit key, 512 byte blocks): 
[  154.305261] 1 operation in 530 cycles (512 bytes)
[  154.313763] test 4 (128 bit key, 1024 byte blocks): 
[  154.315630] 1 operation in 960 cycles (1024 bytes)
[  154.323651] test 5 (128 bit key, 2048 byte blocks): 
[  154.327156] 1 operation in 1812 cycles (2048 bytes)
[  154.333366] test 6 (128 bit key, 4096 byte blocks): 
[  154.340166] 1 operation in 3531 cycles (4096 bytes)
[  154.344341] test 7 (128 bit key, 8192 byte blocks): 
..
[   99.141587] 
[   99.141587] testing speed of rfc4106(gcm(aes)) (rfc4106(gcm_base(nss-ctr-aes,ghash-generic))) encryption
[   99.142372] test 0 (160 bit key, 16 byte blocks): 
[   99.146590] 1 operation in 2048 cycles (16 bytes)
[   99.156794] test 1 (160 bit key, 64 byte blocks): 
[   99.159406] 1 operation in 1152 cycles (64 bytes)
[   99.166308] test 2 (160 bit key, 256 byte blocks): 
[   99.168400] 1 operation in 1022 cycles (256 bytes)
[   99.175449] test 3 (160 bit key, 512 byte blocks): 
[   99.177448] 1 operation in 1023 cycles (512 bytes)
[   99.185116] test 4 (160 bit key, 1024 byte blocks): 
[   99.187634] 1 operation in 1138 cycles (1024 bytes)
[   99.195108] test 5 (160 bit key, 2048 byte blocks): 
[   99.198131] 1 operation in 1370 cycles (2048 bytes)
[   99.204935] test 6 (160 bit key, 4096 byte blocks): 
[   99.211432] 1 operation in 3931 cycles (4096 bytes)
[   99.215910] test 7 (160 bit key, 8192 byte blocks): 
[   99.223960] 1 operation in 4246 cycles (8192 bytes)
[   99.228474] 
[   99.228474] testing speed of gcm(aes) (gcm_base(nss-ctr-aes,ghash-generic)) encryption
[   99.233280] test 0 (128 bit key, 16 byte blocks): 
[   99.237224] 1 operation in 2057 cycles (16 bytes)
[   99.247206] test 1 (128 bit key, 64 byte blocks): 
[   99.249496] 1 operation in 1275 cycles (64 bytes)
[   99.256738] test 2 (128 bit key, 256 byte blocks): 
[   99.259189] 1 operation in 1023 cycles (256 bytes)
[   99.266072] test 3 (128 bit key, 512 byte blocks): 
[   99.268215] 1 operation in 1023 cycles (512 bytes)
[   99.275712] test 4 (128 bit key, 1024 byte blocks): 
[   99.277882] 1 operation in 1151 cycles (1024 bytes)
[   99.285707] test 5 (128 bit key, 2048 byte blocks): 
[   99.289550] 1 operation in 2044 cycles (2048 bytes)
[   99.295538] test 6 (128 bit key, 4096 byte blocks): 
[   99.299460] 1 operation in 2047 cycles (4096 bytes)
[   99.305204] test 7 (128 bit key, 8192 byte blocks): 

I added some ipsec performance numbers to my github. This is without "tricks" like adding "echainiv" or "seqiv" templates and still without the use of any NSS Virtual Interface. Also removed the "hack" to make the skb linear within the e.g esp4.c file.

I will test later with "original" version which uses the IV templates. Reason why I removed them is because there is no IV generation at all in the NSS core or the driver. Which means it always uses the same based on the raw sequence number.

Having issues with the nss-volt-ipq806x.c driver. target/linux is failing to build. Built fine on December 31st Master - don't know what has changed in master since that date that would cause the issue. Anyone able to read this log and help guide me on a fix?

make[5]: Entering directory '/home/HTPC/OpenWRT/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/linux-5.4.89'
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      drivers/regulator/nss-volt-ipq806x.o
drivers/regulator/nss-volt-ipq806x.c:184:5: error: redefinition of 'nss_ramp_voltage'
 int nss_ramp_voltage(unsigned long rate, bool ramp_up)
     ^~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:34:5: note: previous definition of 'nss_ramp_voltage' was here
 int nss_ramp_voltage(unsigned long rate, bool ramp_up)
     ^~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:215:34: error: redefinition of 'nss_ipq806x_match_table'
 static const struct of_device_id nss_ipq806x_match_table[] = {
                                  ^~~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:73:34: note: previous definition of 'nss_ipq806x_match_table' was here
 static const struct of_device_id nss_ipq806x_match_table[] = {
                                  ^~~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:220:12: error: redefinition of 'nss_volt_ipq806x_probe'
 static int nss_volt_ipq806x_probe(struct platform_device *pdev)
            ^~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:78:12: note: previous definition of 'nss_volt_ipq806x_probe' was here
 static int nss_volt_ipq806x_probe(struct platform_device *pdev)
            ^~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:266:31: error: redefinition of 'nss_ipq806x_driver'
 static struct platform_driver nss_ipq806x_driver = {
                               ^~~~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:126:31: note: previous definition of 'nss_ipq806x_driver' was here
 static struct platform_driver nss_ipq806x_driver = {
                               ^~~~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:275:19: error: redefinition of 'nss_ipq806x_init'
 static int __init nss_ipq806x_init(void)
                   ^~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:135:19: note: previous definition of 'nss_ipq806x_init' was here
 static int __init nss_ipq806x_init(void)
                   ^~~~~~~~~~~~~~~~
In file included from ./include/linux/printk.h:6,
                 from ./include/linux/kernel.h:15,
                 from drivers/regulator/nss-volt-ipq806x.c:17:
./include/linux/init.h:196:20: error: redefinition of '__initcall_nss_ipq806x_init7'
  static initcall_t __initcall_##fn##id __used \
                    ^~~~~~~~~~~
./include/linux/init.h:200:35: note: in expansion of macro '___define_initcall'
 #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
                                   ^~~~~~~~~~~~~~~~~~
./include/linux/init.h:231:28: note: in expansion of macro '__define_initcall'
 #define late_initcall(fn)  __define_initcall(fn, 7)
                            ^~~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:279:1: note: in expansion of macro 'late_initcall'
 late_initcall(nss_ipq806x_init);
 ^~~~~~~~~~~~~
./include/linux/init.h:196:20: note: previous definition of '__initcall_nss_ipq806x_init7' was here
  static initcall_t __initcall_##fn##id __used \
                    ^~~~~~~~~~~
./include/linux/init.h:200:35: note: in expansion of macro '___define_initcall'
 #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
                                   ^~~~~~~~~~~~~~~~~~
./include/linux/init.h:231:28: note: in expansion of macro '__define_initcall'
 #define late_initcall(fn)  __define_initcall(fn, 7)
                            ^~~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:139:1: note: in expansion of macro 'late_initcall'
 late_initcall(nss_ipq806x_init);
 ^~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:281:20: error: redefinition of 'nss_ipq806x_exit'
 static void __exit nss_ipq806x_exit(void)
                    ^~~~~~~~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:141:20: note: previous definition of 'nss_ipq806x_exit' was here
 static void __exit nss_ipq806x_exit(void)
                    ^~~~~~~~~~~~~~~~
In file included from ./include/linux/printk.h:6,
                 from ./include/linux/kernel.h:15,
                 from drivers/regulator/nss-volt-ipq806x.c:17:
./include/linux/init.h:237:20: error: redefinition of '__exitcall_nss_ipq806x_exit'
  static exitcall_t __exitcall_##fn __exit_call = fn
                    ^~~~~~~~~~~
./include/linux/module.h:97:24: note: in expansion of macro '__exitcall'
 #define module_exit(x) __exitcall(x);
                        ^~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:285:1: note: in expansion of macro 'module_exit'
 module_exit(nss_ipq806x_exit);
 ^~~~~~~~~~~
./include/linux/init.h:237:20: note: previous definition of '__exitcall_nss_ipq806x_exit' was here
  static exitcall_t __exitcall_##fn __exit_call = fn
                    ^~~~~~~~~~~
./include/linux/module.h:97:24: note: in expansion of macro '__exitcall'
 #define module_exit(x) __exitcall(x);
                        ^~~~~~~~~~
drivers/regulator/nss-volt-ipq806x.c:145:1: note: in expansion of macro 'module_exit'
 module_exit(nss_ipq806x_exit);
 ^~~~~~~~~~~
make[7]: *** [scripts/Makefile.build:262: drivers/regulator/nss-volt-ipq806x.o] Error 1
make[6]: *** [scripts/Makefile.build:496: drivers/regulator] Error 2
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [Makefile:1732: drivers] Error 2
make[5]: Leaving directory '/home/HTPC/OpenWRT/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/linux-5.4.89'
make[4]: *** [Makefile:27: /home/HTPC/OpenWRT/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/linux-5.4.89/.image] Error 2
make[4]: Leaving directory '/home/HTPC/OpenWRT/openwrt/target/linux/ipq806x'
make[3]: *** [Makefile:13: install] Error 2
make[3]: Leaving directory '/home/HTPC/OpenWRT/openwrt/target/linux'
time: target/linux/install#42.65#23.77#20.86
    ERROR: target/linux failed to build.

Simplified the NSS drivers to 14 NSS specific commits. Let me know if it makes sense (suggestions?):

2 Likes

I can't judge the goodness of your code but I can tell you that I successfully build an image using my standard diffconfig_for_nss. I did not flash the image. Waiting for more feedback for that :smiley:

1 Like

I’m currently using:


# NSS Drivers
CONFIG_PACKAGE_kmod-qca-nss-drv=y
CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc=y
CONFIG_PACKAGE_kmod-qca-nss-ecm-standard=y
CONFIG_PACKAGE_kmod-qca-nss-gmac=y
CONFIG_PACKAGE_kmod-nss-ifb=y
CONFIG_PACKAGE_iptables-mod-physdev=y
CONFIG_PACKAGE_kmod-ipt-physdev=y
CONFIG_PACKAGE_kmod-qca-nss-drv-pppoe=y
CONFIG_PACKAGE_MAC80211_NSS_SUPPORT=y

@quarky is using (per a previous post)


CONFIG_PACKAGE_MAC80211_NSS_SUPPORT=y
CONFIG_PACKAGE_kmod-fast-classifier=y
CONFIG_PACKAGE_kmod-qca-nss-crypto=y
CONFIG_PACKAGE_kmod-qca-nss-drv=y
CONFIG_PACKAGE_kmod-qca-nss-drv-eogremgr=y
CONFIG_PACKAGE_kmod-qca-nss-drv-gre=y
CONFIG_PACKAGE_kmod-qca-nss-drv-pppoe=y
CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc=y
CONFIG_PACKAGE_kmod-qca-nss-drv-tun6rd=y
CONFIG_PACKAGE_kmod-qca-nss-drv-tunipip6=y
CONFIG_PACKAGE_kmod-qca-nss-ecm-standard=y
CONFIG_PACKAGE_kmod-qca-rfs=y
CONFIG_PACKAGE_kmod-qca-ssdk-hnat=y
CONFIG_PACKAGE_kmod-shortcut-fe=y
CONFIG_PACKAGE_kmod-shortcut-fe-drv=y
CONFIG_PACKAGE_qca-nss-firmware=y
CONFIG_PACKAGE_qca-ssdk-shell=y

I’m using it for NAT, wireless, and have VPN on my build (I’m not using VPN but both OpenVPN-OpenSSL & wireguard are in my build). Anyone seeing any performance advantages for using NSS crypto, shortcut-fe, or any of the additional packages over my current packages?

any news about the crash and keep nss core at 600mhz?

Ran at 600mhz for 2 days. No crashes on a r7800 (don’t have any crashes at 800mhz... so not helpful).

Speed decreased slightly to 920mbps via NAT.

Have a kernel panic causing reboots on a ea7500v1 ~10 seconds after boot. @jack338c posted his serial log. Recommendations?


[   22.788392] Kernel panic - not syncing: Fatal exception

1 Like

Had a quick look at the logs posted by @jack338c. Between the 2 builds he tested (Dec & Jan), the kernel version has changed. So it could be one of 2 issues that I can think of:

  1. Changes to the kernel that caused the kernel panic.
  2. Changes to the EA7500 .dts file

I don't think the NSS GMAC source was patched?

The stack trace shows kernel panic when trying to load the GMAC driver.

@ACwifidude
I tired use Dec's qcom-ipq8064-eax500.dtsi and qcom-ipq8064-ea7500-v1.dts instead of Jan's one ,then rebuilt,but it will still auto-reboot after 10 seconds

thanks

There is one added gmac patch for ipq8064 devices. It is included in both build versions - otherwise gmac is the same. The .dts files have the same parameters between the builds - (majority of changes are in the .dtsi files for simplicity sake - less files to edit).

Big changes in the newer version:

  1. a month of master changes
  2. doesn’t have Ansuel’s experimental L2 cache fab scaling commits from his branch.
  3. This patch looks like it needs some edits - it is referring to ipq8064.dtsi (? This file doesn’t exist any more - it is now the version 2 file).... this patch is in both versions so is likely not the source of the issue
  1. I included this @KONG patch for gmac (both versions have it - this patch fixed the constant reboots before for ipq8064 devices)

If you are wondering if the NSS effort is progressing when it comes to stability, I would say yes in a big way. Like most people I used to have good performance, but reboot on a daily base or every few days. Back in November I've built an image with some help from @ACwifidude and I'm happy to report that the router was running stable for more than 60 days in a row
Unfortunately my lucky streak has ended today. While trying to access Luci this morning, the router rebooted:


BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r14530+605-9085343
 -----------------------------------------------------

root@openwrt:~# uptime
 10:09:20 **up 61 days, 14:04**,  load average: 0.00, 0.00, 0.00
root@openwrt:~# client_loop: send disconnect: Broken pipe
#


BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r14530+605-9085343
 -----------------------------------------------------
root@openwrt:~# uptime
 10:12:25 up 0 min,  load average: 2.23, 0.58, 0.19

root@openwrt:~# uptime
 10:13:50 up 2 min,  load average: 0.53, 0.43, 0.17
root@openwrt:~#
2 Likes

EA7500 v1 and ea8500 with NSS driver are all working on ACwifidude's repo "OpenWrt SNAPSHOT r15598-c840f8c16a / LuCI Master git-21.016.32520-34e2d6e" Kernel Version 5.4.89
the speed up is impressive,but it's not lucky like R7800 have uptime 60days,it will auto-reboot less than 24 hours

Could you @Ansuel try to fix it? needs your help,Thank you

and here are dts file from you and @ACwifidude
qcom-ipq8064-eax500.dtsi

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "qcom-ipq8064-v2.0.dtsi"

#include <dt-bindings/input/input.h>

/ {
	chosen {
		bootargs = "console=ttyMSM0,115200n8";
		/* append to bootargs adding the root deviceblock nbr from bootloader */
		append-rootblock = "ubi.mtd=";
	};
};

&usb3_0 {
	status = "okay";
};

&usb3_1 {
	status = "okay";
};

&pcie0 {
	status = "okay";

	max-link-speed = <1>;
};

&pcie1 {
	status = "okay";
};

&pcie2 {
	status = "okay";
};

&nand_controller {
	status = "okay";

	pinctrl-0 = <&nand_pins>;
	pinctrl-names = "default";

	nand@0 {
		reg = <0>;
		compatible = "qcom,nandcs";

		nand-ecc-strength = <4>;
		nand-bus-width = <8>;
		nand-ecc-step-size = <512>;

		partitions: partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "SBL1";
				reg = <0x0000000 0x0040000>;
				read-only;
			};

			partition@40000 {
				label = "MIBIB";
				reg = <0x0040000 0x0140000>;
				read-only;
			};

			partition@180000 {
				label = "SBL2";
				reg = <0x0180000 0x0140000>;
				read-only;
			};

			partition@2c0000 {
				label = "SBL3";
				reg = <0x02c0000 0x0280000>;
				read-only;
			};

			partition@540000 {
				label = "DDRCONFIG";
				reg = <0x0540000 0x0120000>;
				read-only;
			};

			partition@660000 {
				label = "SSD";
				reg = <0x0660000 0x0120000>;
				read-only;
			};

			partition@780000 {
				label = "TZ";
				reg = <0x0780000 0x0280000>;
				read-only;
			};

			partition@a00000 {
				label = "RPM";
				reg = <0x0a00000 0x0280000>;
				read-only;
			};

			art: partition@c80000 {
				label = "art";
				reg = <0x0c80000 0x0140000>;
				read-only;
			};

			partition@dc0000 {
				label = "APPSBL";
				reg = <0x0dc0000 0x0100000>;
				read-only;
			};

			partition@ec0000 {
				label = "u_env";
				reg = <0x0ec0000 0x0040000>;
			};

			partition@f00000 {
				label = "s_env";
				reg = <0x0f00000 0x0040000>;
			};

			partition@f40000 {
				label = "devinfo";
				reg = <0x0f40000 0x0040000>;
			};

			partition@f80000 {
				label = "kernel1";
				reg = <0x0f80000 0x2800000>;  /* 3 MB spill to rootfs */
			};

			partition@1280000 {
				label = "rootfs1";
				reg = <0x1280000 0x2500000>;
			};

			partition@3780000 {
				label = "kernel2";
				reg = <0x3780000 0x2800000>;
			};

			partition@3a80000 {
				label = "rootfs2";
				reg = <0x3a80000 0x2500000>;
			};
		};
	};
};

&mdio0 {
	status = "okay";

	pinctrl-0 = <&mdio0_pins>;
	pinctrl-names = "default";

	phy0: ethernet-phy@0 {
		reg = <0>;
		qca,ar8327-initvals = <
			0x00004 0x7600000   /* PAD0_MODE */
			0x00008 0x1000000   /* PAD5_MODE */
			0x0000c 0x80        /* PAD6_MODE */
			0x00010 0x2613a0    /* PWS_REG */
			0x000e4 0x6a545     /* MAC_POWER_SEL */
			0x000e0 0xc74164de  /* SGMII_CTRL */
			0x0007c 0x4e        /* PORT0_STATUS */
			0x00094 0x4e        /* PORT6_STATUS */
			>;
	};
};

&gmac1 {
	status = "okay";
	compatible = "qcom,nss-gmac";
	reg = <0x37200000 0x200000>;
	interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
	phy-mode = "rgmii";
	qcom,id = <1>;
	qcom,pcs-chanid = <0>;
	qcom,phy-mdio-addr = <0>;
	qcom,poll-required = <0>;
	qcom,rgmii-delay = <1>;
	qcom,phy_mii_type = <0>;
	qcom,emulation = <0>;
	qcom,forced-speed = <1000>;
	qcom,forced-duplex = <1>;
	qcom,socver = <0>;
	qcom,irq = <255>;
	mdiobus = <&mdio0>;

	pinctrl-0 = <&rgmii2_pins>;
	pinctrl-names = "default";

	fixed-link {
		speed = <1000>;
		full-duplex;
	};
};

&gmac2 {
	status = "okay";
	compatible = "qcom,nss-gmac";
	reg = <0x37400000 0x200000>;
	interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
	phy-mode = "sgmii";
	qcom,id = <2>;
	qcom,pcs-chanid = <1>;
	qcom,phy-mdio-addr = <4>;
	qcom,poll-required = <0>;	/* no polling */
	qcom,rgmii-delay = <0>;
	qcom,phy_mii_type = <1>;
	qcom,emulation = <0>;
	qcom,forced-speed = <1000>;
	qcom,forced-duplex = <1>;
	qcom,socver = <0>;
	qcom,irq = <258>;
	mdiobus = <&mdio0>;

	fixed-link {
		speed = <1000>;
		full-duplex;
	};
};

&adm_dma {
	status = "okay";
};

qcom-ipq8064-ea8500.dts

#include "qcom-ipq8064-eax500.dtsi"

/ {
	model = "Linksys EA8500 WiFi Router";
	compatible = "linksys,ea8500", "qcom,ipq8064";

	memory@0 {
		reg = <0x42000000 0x1e000000>;
		device_type = "memory";
	};

	aliases {
		mdio-gpio0 = &mdio0;

		led-boot = &led_power;
		led-failsafe = &led_power;
		led-running = &led_power;
		led-upgrade = &led_power;
	};

	keys {
		compatible = "gpio-keys";
		pinctrl-0 = <&button_pins>;
		pinctrl-names = "default";

		wifi {
			label = "wifi";
			gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RFKILL>;
		};

		reset {
			label = "reset";
			gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};

		wps {
			label = "wps";
			gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_WPS_BUTTON>;
		};
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&led_pins>;
		pinctrl-names = "default";

		wps {
			label = "green:wps";
			gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
		};

		led_power: power {
			label = "white:power";
			gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
			default-state = "keep";
		};

		wifi {
			label = "green:wifi";
			gpios = <&qcom_pinmux 54 GPIO_ACTIVE_HIGH>;
		};
	};
};

&qcom_pinmux {
	button_pins: button_pins {
		mux {
			pins = "gpio65", "gpio67", "gpio68";
			function = "gpio";
			drive-strength = <2>;
			bias-pull-up;
		};
	};

	led_pins: led_pins {
		mux {
			pins = "gpio6", "gpio53", "gpio54";
			function = "gpio";
			drive-strength = <2>;
			bias-pull-up;
		};
	};
};

&sata_phy {
	status = "okay";
};

&sata {
	status = "okay";
};

&partitions {
	partition@5f80000 {
		label = "syscfg";
		reg = <0x5f80000 0x2080000>;
	};
};

&mdio0 {
	phy4: ethernet-phy@4 {
		reg = <4>;
	};
};

&gmac1 {
	qcom,phy_mdio_addr = <4>;
	qcom,poll_required = <1>;
	qcom,rgmii_delay = <0>;
	qcom,emulation = <0>;
};

/* LAN */
&gmac2 {
	qcom,phy_mdio_addr = <0>;	/* none */
	qcom,poll_required = <0>;	/* no polling */
	qcom,rgmii_delay = <0>;
	qcom,emulation = <0>;
};

qcom-ipq8064-ea7500-v1.dts

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "qcom-ipq8064-eax500.dtsi"

/ {
	model = "Linksys EA7500 V1 WiFi Router";
	compatible = "linksys,ea7500-v1", "qcom,ipq8064";

	memory@0 {
		reg = <0x42000000 0xe000000>;
		device_type = "memory";
	};

	aliases {
		led-boot = &led_power;
		led-failsafe = &led_power;
		led-running = &led_power;
		led-upgrade = &led_power;
	};

	chosen {
		/* look for root deviceblock nbr in this bootarg */
		find-rootblock = "ubi.mtd=";
	};

	keys {
		compatible = "gpio-keys";
		pinctrl-0 = <&button_pins>;
		pinctrl-names = "default";

		reset {
			label = "reset";
			gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};

		wps {
			label = "wps";
			gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_WPS_BUTTON>;
		};
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&led_pins>;
		pinctrl-names = "default";

		led_power: power {
			label = "white:power";
			gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
			default-state = "keep";
		};
	};
};

&qcom_pinmux {
	button_pins: button_pins {
		mux {
			pins = "gpio65", "gpio68";
			function = "gpio";
			drive-strength = <2>;
			bias-pull-up;
		};
	};

	led_pins: led_pins {
		mux {
			pins = "gpio6";
			function = "gpio";
			drive-strength = <2>;
			bias-pull-up;
		};
	};
};

&partitions {
	partition@5f80000 {
		label = "sysdiag";
		reg = <0x5f80000 0x100000>;
	};

	partition@6080000 {
		label = "syscfg";
		reg = <0x6080000 0x1f80000>;
	};
};

&mdio0 {
	phy4: ethernet-phy@4 {
		reg = <4>;
	};
};

&gmac1 {
	qcom,phy_mdio_addr = <4>;
	qcom,poll_required = <1>;
	qcom,rgmii_delay = <0>;
	qcom,emulation = <0>;
};

/* LAN */
&gmac2 {
	qcom,phy_mdio_addr = <0>;	/* none */
	qcom,poll_required = <0>;	/* no polling */
	qcom,rgmii_delay = <0>;
	qcom,emulation = <0>;
};

the router freeze or we have some crashlog?

but this should already be fixed o.O also you said the reboot was after 24 hours

His ea7500v1 seems to not be making it more than about 10 seconds. I’ll work on it more this weekend.