[PR] ipq806x: kernel 5.10 bump code propose

Hi @Ansuel,

I'm starting to think about testing on my r7500v2 (may be a week or two until i get to it).

This device is currently configed as an AP only and has 2 VLANs so based on @hnyman's comments, I suspect I'll need to make some config changes.

Do you think your 5.10 testing branch is ready for this? Are there any swconfig to DSA migration guides or documentation i should look at before i jump in?

Otherwise I'll dive right in and post questions here if/when I get stuck.

Thank you very much for doing this.

Hopefully the branch first gets rebased on the current master, as right now it reflects the Openwrt master (and generic 5.10 stuff) as of March 1st.

The pr doesn't apply on master?

I meant that if somebody compiles directly from your branch, he misses the other commits of the last two weeks, as the branch is currently based on two-week old code.


as long as the relavent commits are fairly obvious, i'll try to cherry pick them from @ansuel's branch and apply on top of current master. Unless that's not helpful of course...

@hnyman I wanted to try DSA on my R7800 that I am using as Switch and WiFi AP. I tried your build R7800-master-r16173-3d1ea0d77f-20210312-2210-sysupgrade.bin but my R7800 went into boot-loop. I had to revert back to 21.02-SNAPSHOT build from https://downloads.openwrt.org/releases/21.02-SNAPSHOT/targets/ipq806x/generic/ using TFTP recovery method.

Any idea why it went into boot-loop? Also I am not sure if this is something I should post here or in Build for Netgear R7800. Thank you for your builds.

Will Kernel 5.4 in 21.02 (when officially released) support DSA in R7800? I see DSA is one of the release goals for 21.02 but your patches are for Kernel 5.10 in 'master' branch.

Will setting VLAN ID's be supported in Kernel 5.4 DSA in 21.02? Thank you for your work in enabling DSA in R7800.

AFAIK 21.02 has already been branched... so no. 21.02 will still use the swconfig driver.
5.4 qca8k driver doesn't support vlan (it should be in software)
5.10 has support for it.

Can you please elaborate on the above sentence? I am confused. I am not a developer so I am not fully aware of software intricasies.

The switch supports vlan handling but the dsa driver has support for it only in kernel 5.10
I'm not 100% sure about this but I think the kernel can still handle vlan in software using the cpu to process the packet.
(but in any case next openwrt version will use 5.10 as the main kernel... so 5.4 supports dsa just to not complicate things and have the same files across different kernel version)

Oh, so from what I understand, if I use VLAN's with kernel 5.4 DSA, the packets have to be processed by the main CPU. But in kernel 5.10 DSA, VLAN's are handled directly in the switch driver/hardware (is this software/hardware offloading?) and the CPU is not used for processing VLAN packets. Is my explanation correct?

I thought with 21.02 branched, all devices in 21.02 will stick with kernel 5.4 and only 'master' branch moves to kernel 5.10.

No idea what happened for you. I just tested by reflashing that build to my R7800, without settings so that new defaults to be created. Works quite ok.

 OpenWrt SNAPSHOT, r16173-3d1ea0d77f
root@router1:/# uname -a
Linux router1 5.10.20 #0 SMP Fri Mar 12 19:52:01 2021 armv7l GNU/Linux

Note that you can't sysupgrade with settings and you can't restore settings afterwards. (You can manually restore them selectively, but old network settings can brick the router)

(keeping settings doesn't cause bootloop at worst you lose ethernet connection but wifi would still work)

Yes, Ansuel meant the next future release by that "next release". 21.02 will remain with 5.4.

Terminologically 21.02 is currently difficult as it has already branched but there are no formal releases, yet.

1 Like

So this is what I did. Initially I was running openwrt-21.02-snapshot-r15870-e4d061cd1a from downloads.openwrt.org in my R7800.

  1. FIrst I tried upgrading to R7800-master-r16173-3d1ea0d77f-20210312-2210-sysupgrade.bin using luci with "retain settings" enabled. It silently failed.
  2. Then I loaded R7800-master-r16173-3d1ea0d77f-20210312-2210-sysupgrade.bin to /tmp using SFTP and through ssh ran "sysupgrade -v /tmp/*sysupgrade.bin". I got the error message "Config cannot be migrated from swconfig to DSA" in ssh terminal window.
  3. FInally after few minutes I tried to upgrade to R7800-master-r16173-3d1ea0d77f-20210312-2210-sysupgrade.bin using luci with "retain settings" unchecked. After that it went into boot-loop.

After it went into boot-loop, I used the TFTP method to flash openwrt-21.02-snapshot-r15879-3b6c93298c-ipq806x-generic-netgear_r7800-squashfs-factory.img to get back to working R7800.

you should have used the "-F -n" options, meaning "force" and "not keep settings".

Ok maybe upgrading using luci was what messed it up. I will try "-F -n". Should I use factory.img or sysupgrade.bin? Also why factory image is .img but sysupgrade is .bin?

Sysupgrade image, as you are using sysupgrade...

Filename type has no special meaning.

it still looks very strange that the image caused a bootloop

I tried just now using "-F -n". Still bootlooped. Went back to 21.02 -SNAPSHOT build using TFTP.