But is it built into upstream openwrt right now? Do I need to fetch this and build myself?
Yes, this driver hasn’t been integrated into the upstream OpenWrt repository yet. You’ll need to clone it and build it yourself.
And will never be.
No DSA driver
What?! no DSA? Just swconfig?? Nooooou
But surely if they have written swconfig very neatly, we could port to DSA?
Read for yourself
In a nutshell
with DSA you have real network interfaces.
with all dirty tricks the device will support.
AFAIR
There is some device in upstream/OpenWRT which has four or more switch ports, but will appear as real (independed) ethernet devices
all of them
that's the idea behind DSA.
Which means, supported switches have 50 or more Linux ethernet interfaces
and you can combine them as you wish
two or more switches, depends only on hw
Don't worry bros I am gonna do this
But I need to have a free time and some coffee first.
I rewrote a version with the help of AI — it now supports DSA, so you can test it out. JiaY-shi/rtl837x-dsa-driver
The Makefile looks weird
From a quick look a some source files this also looks weird.
I can only assume this is DSA on top of swconfig
In effort to add support for GL-MT5000 device, some new code has been released based in the source dump from GL.iNET & Realtek for RT8366ub + RT8371c switches (presumably from Realtek SDK).
Perhaps there is something useful in RT8371c source code. Check out the relevant discussions here:
Here is another RTL8372n switch implementation by @perceival
======
For comment on this Switch driver implementation, you can check out this discussion:
Oh my god, which I am gonna use then?? I am confused ![]()
For MT7988, I've tried the JiaY-shi rtl837x DSA driver and it works well, even though it's just a DSA wrapper over the Realtek RTK SDK, it saves you from having to deal with things like properly powering on the RTL8224 PHY on each port or implementing phylink_fixed_state for autoneg from scratch.
One caveat worth knowing: hardware NAT offload won't work regardless of which DSA driver you use. The root cause is architectural — MTK PPE can only offload flows through switches that use the MTK-compatible CPU tag format. The Realtek RTL8_4 tag (EtherType 0x8899) is not in that set, and there is no evidence the MT7988 PPE silicon can generate that tag format at egress. Software flow offload still works fine though.
Hmm are you sure? It can be made that way afaik. It wouldn't be very difficult.
More development in GL.iNET GL-BE9300 thread:
-
switching the RTL837x CPU tagging to the kernel’s tag_8021q DSA tagging path by @KakatkarAkshay
-
A refactored DSA RTL8372 driver by @airjinkela , who is also the author of RTL837x gsw driver earlier in this thread.
See direct GitHub project page here: https://github.com/RuijieNetworksCommunity/rtl837x-dsa-driver -
Also, it appears that RTL8372N datasheet can now be found among Google search results
Seems there's some recent new code & development in this RTLPlayground project.
