Netgear R7800 exploration (IPQ8065, QCA9984)

also in theory it should be enabled by default, if i'm not wrong.

One example (router connected to a askey modem (broadcom switch))

root@No-Lag-Router:~# ethtool --show-eee wan
EEE Settings for wan:
        EEE status: enabled - active
        Tx LPI: disabled
        Supported EEE link modes:  100baseT/Full
                                   1000baseT/Full
        Advertised EEE link modes:  100baseT/Full
                                    1000baseT/Full
        Link partner advertised EEE link modes:  100baseT/Full
                                                 1000baseT/Full

Anyone know what's going on here?
I get a lot of messages like these

[1806716.506993] ath10k_pci 0000:01:00.0: fetch-ind: failed to lookup txq for peer_id 47 tid 0

Linux nighthawk 5.4.99 #0 SMP Sat Feb 20 18:23:45 2021 armv7l GNU/Linux
11:29:21 up 23 days, 15:45, load average: 0.00, 0.04, 0.01

FWIW, i don't see those on my r7500v2 (AP only).

Linux r7500v2 5.4.99 #0 SMP Mon Feb 22 08:04:04 2021 armv7l GNU/Linux
r7500v2 # uptime
 08:23:27 up 21 days, 13:33,  load average: 0.00, 0.02, 0.00

nice stability lately on master tho

Yeah, I get them too. I filed a bug but unclear if anyone looks at these bugs.

These too:

[162053.710365] ath10k_pci 0000:01:00.0: Invalid peer id 16 or peer stats buffer, peer: 00000000  sta: 00000000
[191856.628897] ath10k_pci 0000:01:00.0: received unexpected tx_fetch_ind event: in push mode

I also suffer of random disconnects:

What's the benefit of moving to DSA instead of switchdev? Is switchdev being deprecated in newer kernels?

You mean swconfig

Yeah, swconfig... it's a bit confusing because OpenWrt actually names swconfig as "switchdev".

anyway benefits of dsa

  • Drop custom code (that is very hacky)
  • Use mainline driver
  • Dsa in theory should give better perf
  • Better documentation instead of relying on mysterious hex value applied to the switch
  • in theory dsa should be easier to use as every port is a separate interface
3 Likes

Any reason why /proc/cpuinfo won't show current CPU MHz?
It just prints BogoMIPS?

Contents of /proc/cpuinfo vary between architectures, mips and arm never displayed the CPU frequency - and just for the avoidance of doubt, the bogomips value is indeed bogus. If you want to know the current frequency, check cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq.

3 Likes

i got that on r7800: 1725000

Here's (part of) a little script I use:

  echo ">>> CPU Freq Stats:"
  cat /sys/devices/system/cpu/cpufreq/policy*/stats/time_in_state
  echo ">>> Current Frequencies:"
  cat /sys/devices/system/cpu/cpufreq/policy*/*_cur_freq
  echo ">>> Temperatures:"
  cut -c1-2 /sys/devices/virtual/thermal/*/temp

I noticed /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq and /sys/devices/system/cpu/cpufreq/policy*/cpuinfo_cur_freq doest't go hand in hand always..

Wonder which one is more correct?

You're probably catching it while it's switching frequencies and you're not reading the 2 values in any atomic way and there's perhaps some delay for these values to get updated on the virtual fs. One value is what the governor wants the freq to transition to and the other is what it actually is.
FWIW, I run mine with performance governor always at 1.7GHz so I don't have to think about these questions :slight_smile:

1 Like

What is the benefit of using the performance governor?

The other available governors scale up with use dont they, is there really a noticable difference when compared to performance governor?

/J

Aggressive ondemand settings are similar to the performance governor.

Performance governor is at max cpu speed all the time so there might be a use scenario that you don’t want your router to skip a beat.

I’ve run both. Recently I am running the performance governor.

I think about it the other way: why not use the perf governor all the time, what is the harm? In my experience it adds about a 2C temperature increase which is just noise really and some will say it uses more power, but then again just noise in the grand scheme of things of how much power you use in a household (there may be use cases where low power use is a requirement but those I don't think are common).

In the past there were issues with ondemand switching frequencies at low freq but I think those are fixed now. That's why you'd see people recommend using 800MHz as the lowest freq with ondemand.

I experimented with ondemand, schedutil and performance governor and chose to always use performance for ... max performance.

This is for people building for R7800 by themselves:

Looks like commit fa731838 in master causes trouble for R7800.

PC does not get DHCP address via fixed line. But wifi works ok and PC gets IP.
But nothing obvious seems to be amiss.
Router seems to boot ok, ifconfig shows sensible stuff at the first glance, all settings were restored & etc.

I reverted that for my master-r16678-cde31976e3-20210507 build, which made R7800 to work again.

EDIT:
fixed with

1 Like

A bit of a rant, but still. Made a build using current 21.02 branch and ath10k-ct-htt, no SQM and other bells-and-whistles.

Default performance of both NAT and WiFi is just horrible, one CPU core at 100% another is sitting idle. I had to manually:

  1. install and enable irqbalance
  2. enable packet steering
  3. enable NAT software offload
  4. ramp up ondemand governor settings.

Only then NAT performance could barely cap my 500Mbit/s ISP link.
WiFi reaches around 550-600Mbit/sec of TCP iperf3 on 867 PHY rate.

I mean its 2021, IRQ issues on multi-core Openwrt platforms have been known for years, as well as (partial) solutions to them. Why, oh why can't these mitigations be enabled by default to reach majority of OpenWrt users and give them at least average performace, instead of horrible one?

Even then, without SQM R7800 should run circles and NAT gigabit line without breaking a sweat, at 50% load or so.

Little MIPS CPU on TPLink WDR4300 could software fastpath NAT at 700Mbit/s in OpenWRT years and years ago, where is a bottleneck now?

2 Likes

Eagerly awaiting your patches, quick, I'm holding my breath.

--
The performance limits and pecularities about ipq806x vs NSS/ NPU offloading are well documented by now, please search for them.
Furthermore, don't compare apples to kiwis - hardware performance and out-of-tree offloading are not a fair comparison. Without SFE, the tl-wdr4300 barely achieves 150 MBit/s, while ipq8065 does 500 MBit/s, at its limits, but still.

5 Likes