[PR] ipq806x: kernel 5.10 bump code propose

Is that a question for me or are you just thinking out loud?

So I have an (short) opportunity to test tomorrow but I ran into a compile issue:

...
FATAL ERROR: Couldn't open "/home/sn/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_\
eabi/linux-ipq806x_generic/linux-5.10.23/arch/arm/boot/dts/qcom-ipq8064-g10.dtb": No such fil\
e or directory
mkimage: Can't open /home/sn/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/lin\
ux-ipq806x_generic/asrock_g10-fit-uImage.itb.new.tmp: No such file or directory
make[5]: *** [Makefile:431: /home/sn/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_\
eabi/linux-ipq806x_generic/asrock_g10-fit-uImage.itb] Error 255
make[5]: *** Waiting for unfinished jobs....
...

not sure atm if I did something silly. I consider this an "aggressive" build attempt as I just used my normal AP config (with a fair amount of packages/kmods) using your PR on top of latest master. I can make it simpler...

To get ready for the build, I did:

cd ~/openwrt
make distclean
git checkout master
git fetch upstream
git rebase upstream/master
git fetch upstream pull/3954/head:k510
git checkout k510
git rebase master
...

followed by my normal build script. All of which went without error until the build.

I'll see if I can't figure out what's up but a hint would be appreciated as I haven't done this in a while.

EDIT: i'm still not sure why i continue to get this error during building, but after a few other attempts, I checked the ~/openwrt/bin/targets/ipq806x/generic and the r7500v2 images are there. I missed my window for today, but I think i can at least load it later this week and post a dmesg if there is anything interesting. Re-config for dsa looks relatively straight forward even for my network vlans...

1 Like

both...
long story:
there are 7 range that the cpu can work based on how good the chip is.
So we need to understand if your router requires more voltage or less voltage...
a quick test would be do a speed test and check the values here

cat /sys/kernel/debug/regulator/regulator_summary

This is in 21.02-SNAPSHOT r15915-31bca5f256 build from downloads.openwrt.org. I took multiple outputs while the speed test was running, as I was not sure if the values change or remain constant.

EDIT: I am also running my R7800 with the following in /etc/rc.local

echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo performance > /sys/devices/system/cpu/cpufreq/policy1/scaling_governor

ok now i need your idle voltage...
just do various regulator summary and we should have found your pvs

I am currently having only a few websites open (but no videos) and not using the full download/upload bandwidth. I don't know if that counts as idle. I checked the regulator_summary again and the values are same as before. I have set both the cpu cores to 'performance' governor. I don't know if that is keeping the regulator values constant.

Also the current values are shown as 0mA. Does it mean the current values are actually in uA (micro Amps) that is rounded off to 0 mA, or is it actually 0 mA (zero current usage)? Current value being zero signifies open circuit. I am confused.

pls revert the gov to the original value or the voltage is not scaled.
about 0mA the regulator doesn't comunicate the A used. the system just tells the regulator what voltage should be used.

I updated the same gist with captures both during Idle, during Speed Test and then Idle again, with ondemand governor (default).

it seems you have a pvs3 while I have pvs4.. strange situation wonder if there is a problem with setting the voltage at the wrong time?

What's pvs3 and pvs4?

Voltage range based on how good the chip is.

@ka2107 i should have found the cause... in the original code the voltage tolerance was in percentage and not a static number
So a voltage difference of +5% became for some reason a flat +5000 and this change a lot since a voltage can change from 780000 to 813750 that should be the right value... I will update the voltage data with this new discovery and we will test.

@hnyman when you have time, can you make another firmware with the 2 new commits? So he can test if the voltage are correct now? (I really don't know if the new voltage can cause some instability, so keep this version separate from the others or some user will complain about random crash)

1 Like

I can do that.

Unrelated to that:
I am wondering if we should disable the 384000 speed step at the same time as the DTS is modified in any case?

There has been lots of discussion during the years about the somewhat below-expectations performance with "ondemand" governor, and one reason has been CPU / cache frequency scaling from/to 384k vs 600k. I tested with flent yesterday, and eliminating the 384k from the speed table made the latency under load much better. It is not directly related to this DTS/5.10 bump, but might be something that we might consider.

Thx a lot.

About the 384000 step I think the best thing would be to tweak the ondemand governor and make it more aggressive, in theory that would make the system more responsive and lower the latency.
(think the main problem with latency is traffic spike)

I have already done that in my builds, but in a mild way.

I made Test-DSA-kernel510-master-r16313-851dadc257-20210323 for my R7800 community build.

 OpenWrt SNAPSHOT, r16313-851dadc257
 -----------------------------------------------------
root@router1:~# uname -a
Linux router1 5.10.23 #0 SMP Tue Mar 23 17:07:31 2021 armv7l GNU/Linux

root@router1:~# cat /sys/kernel/debug/regulator/regulator_summary
 regulator                      use open bypass  opmode voltage current     min     max
---------------------------------------------------------------------------------------
 regulator-dummy                 13   13      0 unknown     0mV     0mA     0mV     0mV
    29000000.sata-target          1                                 0mA     0mV     0mV
    29000000.sata-phy             1                                 0mA     0mV     0mV
    29000000.sata-ahci            1                                 0mA     0mV     0mV
    1b700000.pci-vdda_refclk      1                                 0mA     0mV     0mV
    1b700000.pci-vdda_phy         1                                 0mA     0mV     0mV
    1b700000.pci-vdda             1                                 0mA     0mV     0mV
    1b500000.pci-vdda_refclk      1                                 0mA     0mV     0mV
    1b500000.pci-vdda_phy         1                                 0mA     0mV     0mV
    1b500000.pci-vdda             1                                 0mA     0mV     0mV
    s1a                           1    1      0 unknown  1100mV     0mA  1050mV  1150mV
       soc:l2-cache-l2            1                                 0mA  1100mV  1100mV
    s1b                           0    0      0 unknown  1050mV     0mA  1050mV  1150mV
    s2a                           1    1      0 unknown   837mV     0mA   775mV  1275mV
       cpu0-cpu                   1                                 0mA   831mV   918mV
    s2b                           1    1      0 unknown   837mV     0mA   775mV  1275mV
       cpu1-cpu                   1                                 0mA   831mV   918mV
 SDCC Power                       1    0      0 unknown  3300mV     0mA  3300mV  3300mV

During flent speedtest:

root@router1:/tmp/rrd/router1/ping# cat /sys/kernel/debug/regulator/regulator_summary
 regulator                      use open bypass  opmode voltage current     min     max
---------------------------------------------------------------------------------------
 regulator-dummy                 13   13      0 unknown     0mV     0mA     0mV     0mV
    29000000.sata-target          1                                 0mA     0mV     0mV
    29000000.sata-phy             1                                 0mA     0mV     0mV
    29000000.sata-ahci            1                                 0mA     0mV     0mV
    1b700000.pci-vdda_refclk      1                                 0mA     0mV     0mV
    1b700000.pci-vdda_phy         1                                 0mA     0mV     0mV
    1b700000.pci-vdda             1                                 0mA     0mV     0mV
    1b500000.pci-vdda_refclk      1                                 0mA     0mV     0mV
    1b500000.pci-vdda_phy         1                                 0mA     0mV     0mV
    1b500000.pci-vdda             1                                 0mA     0mV     0mV
    s1a                           1    1      0 unknown  1100mV     0mA  1050mV  1150mV
       soc:l2-cache-l2            1                                 0mA  1100mV  1100mV
    s1b                           0    0      0 unknown  1050mV     0mA  1050mV  1150mV
    s2a                           1    1      0 unknown  1025mV     0mA   775mV  1275mV
       cpu0-cpu                   1                                 0mA  1021mV  1128mV
    s2b                           1    1      0 unknown   837mV     0mA   775mV  1275mV
       cpu1-cpu                   1                                 0mA   831mV   918mV
 SDCC Power                       1    0      0 unknown  3300mV     0mA  3300mV  3300mV

Ps. great that you rebased your branch.

1 Like

@Ansuel I tested @hnyman's build Test-DSA-kernel510-master-r16313-851dadc257-20210323 and my R7800 booted successfully.

However I was not able to get VLAN tagged traffic from/to my Raspberry Pi 4B (main router, running 21.02-SNAPSHOT) working on the DSA build. I am not sure if I am doing something wrong in the config or is it a bug. I reverted back to 21.02-SNAPSHOT swconfig build for now. I will try DSA again maybe during the weekend. Glad I could help in debugging the voltage issue. Thank you for your work on DSA.

@hnyman Thank you for the build.

This is the default config of a realtek/ rtl838x device (gs1900-8), using DSA to configure the management VLAN (well, the lan network) on port 1, tagged with VID100:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdXX:XXXX:XXXX::/48'

config device 'switch'
	option name 'switch'
	option type 'bridge'
	option macaddr 'fc:f5:28:XX:XX:Xe'

config bridge-vlan 'wan_vlan'
	option device 'switch'
	option vlan '1'
	option ports ' lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8'

config interface 'wan'
	option ifname 'switch.1'
	option proto 'dhcp'

config device 'wan_switch_1_dev'
	option name 'switch.1'
	option macaddr 'fc:f5:28:XX:XX:Xe'

config interface 'wan6'
	option ifname 'switch.1'
	option proto 'dhcpv6'

config bridge-vlan 'lan_vlan'
	option device 'switch'
	option vlan '100'
	option ports 'lan1:t'

config interface 'lan'
	option ifname 'switch.100'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device 'lan_switch_100_dev'
	option name 'switch.100'
	option macaddr 'fe:f5:28:XX:XX:Xe'

Thanks @slh. I got DSA config working on my R7800 that I am using as a Ethernet Switch and WiFi access Point

My R7800 setup is

WAN port: Modem
LAN1 - Raspberry Pi 4 Model B - Main Router running OpenWRT 21.02-SNAPSHOT
LAN2 - Nothing
LAN3 - lan_2 (guest lan network)
LAN4 - lan_1 aka main local network
2.4 GHz WiFi - lan_2 guest network
5 GHz WiFi - lan_1 local network

I am using VLAN tagged traffic on LAN1 port of R7800 to separate "internet" (VLAN ID 1001), "lan_1" (VLAN ID 2001) and "lan_2" (VLAN ID 2002) packets from/to my Raspberry Pi 4B.

My R7800 DSA /etc/config/network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd00:0000:0000::/48'
	option packet_steering '1'

config interface 'lan_0'
	option proto 'static'
	option defaultroute '0'
	option delegate '0'
	list ipaddr '192.168.1.200/24'
	option ifname 'switch0.2001'

config interface 'wan'
	option proto 'none'
	option force_link '1'
	option defaultroute '0'
	option peerdns '0'
	option delegate '0'
	option ifname 'switch0.1001'

config interface 'lan_1_dhcpv4'
	option proto 'dhcp'
	option delegate '0'
	option ifname 'switch0.2001'

config interface 'lan_1_dhcpv6'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'no'
	option delegate '0'
	option ifname 'switch0.2001'

config interface 'lan_2'
	option proto 'none'
	option defaultroute '0'
	option peerdns '0'
	option delegate '0'
	option ifname 'switch0.2002'
	option force_link '1'

config bridge-vlan
	option device 'switch0'
	option vlan '1001'
	list ports 'lan1:t'
	list ports 'wan'

config bridge-vlan
	option device 'switch0'
	option vlan '2001'
	list ports 'lan1:t'
	list ports 'lan2'
	list ports 'lan4'

config bridge-vlan
	option device 'switch0'
	option vlan '2002'
	list ports 'lan1:t'
	list ports 'lan3'

config device
	option type 'bridge'
	option name 'switch0'
	list ifname 'lan1'
	list ifname 'lan2'
	list ifname 'lan3'
	list ifname 'lan4'
	list ifname 'wan'

config device
	option name 'switch0.2001'
	option acceptlocal '1'

@hnyman what changes did you do to the gov on your firmware ?