Netgear R7800 exploration (IPQ8065, QCA9984)

Is anyone able to enable EEE (Energy Efficient Ethernet)? The switch should support it, I set enable_eee to 1 in swconfig, but devices that connect to the port are unable to negotiate EEE.

ipq806x is about to move from swconfig to dsa switch drivers, see the kernel v5.10 PR and thread, it would probably be most useful if you could repeat your tests with dsa.

Edit: I would be rather surprised if anyone had tested EEE on QCA8337 (nor most other devices typically running OpenWrt), but the dsa drivers should offer you more insight with ethtool and iproute2 (EEE has been tested on the dsa based realtek target).

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