Support for RTL838x based managed switches

RTL9301 support is basically done, what is missing is the 10GBit SFP+ ports and IPv6 L3 offloading (most of IPv4 L3 offloading works). Two routers using the RTL9301 have support, the Zyxel XGS1210-12 and the XGS1250-12.
The RTL9301 support is in this PR:

The DTS for the XGS switches can be found here:

In the same tree is also 10GBit support for the 3 Aquantia AQR113c PHYs that provide the multi-gbit support, the PR does only 5GBit.

1 Like

This is great. I would need to use the 10G SPF+ ports, so will that feature eventually work or what's preventing those ports from working?

For PoE support with RTL9301, what PoE chipset's are supported? What about the PSE chip HS104PTI and HS104PBI? It is controlled by 12C register control, whatever that means.
http://www.poeplus.com/?s=S3024P-4SE

1 Like

The SFP+ ports are being intermittently worked on since months, but although there is complete GPL source code for this, they are very difficult to set up. While there is progress in understanding, there is no breakthrough yet. So I cannot give you any time estimate. Even if we get it working this week, it would still take months until it shows up in a stable release.

How did you find the reference to those PoE Chips? I assume 12C is i2c. So far there is no support for these kind of chips.The ones supported are Brodcom and are controlled via UART and an intermediary ARM SoC. I cannot give you an estimate whether and when there will be support. Also because none of the devs have one of these devices.

2 Likes

Website is online again. I haven't actually worked with the network hardware/driver, I've only been putting together the info we have on it (that I know of).

As far as I understand, the reason field is provided by the switch on received frames. You could modify it, but that would be meaningless. For a more complete/correct interpretation of all the fields and features, someone else will have to fill it out.

The RTL8231 driver is currently stranded upstream, due to some missing feature in the kernel's regmap interface. Part of that driver could also be used for an upstream LED driver, but also there I can't really provide a time frame.

Ah, makes sense. Thanks for the clarification. I did try to ascertain this conclusion from your previous comments and linked patches, but it wasn't completely clear.

Do you see any chance of these missing features being implemented in kernel 5.14?

I just asked the seller which PoE chipset was in this switch. I am open to purchasing / providing one of these to the devs, so let me know who would be responsible for implementing such a solution.

I guess @svanheule is the right person, he really dug into the protocol of the other PoE chips. He also knows how to analyze busses like the I2C.

BTW: currently there is a big effort together with brainslayer from DD-WRT to get support for RTL931x-based switches done. This will include their SFP+ ports which look pretty much similar to the ones on the 930x. So maybe going that route will finally crack this problem. Status at this point is: the switches boot, including SMP!

3 Likes

@svanheule please let me know what I can do to assist.

Interesting, I actually like the datasheet of the RTL931X more than the RTL930X. Did brainslayer find a manufacture, or what brand / model has the RTL931X? Also I looked on DD-WRT's website, but didn't find any mention of this. I actually though that DD-WRT merged with OpenWRT? Is DD-WRT a competing OS to Open-WRT?

A datasheet documenting the I2C interface of these PSE chips would be the preferred option by far.

Otherwise you have to start looking at decompiled code, and capture I2C traces with a logic analyser. Then you just have a big box of puzzle pieces, and it takes a long time to put everything together into something consistent.

There are a couple of such devices known. For example the Zyxel XS1930-10 (8x10GBit + 2 SFP+), also the EdgeCore ECS4125-10P (8x2.5GBit + 2 SFP+). The issue is that the price tags are quite serious. The 10P devices are at about 400-600 Euros and the big switches with up to 52 ports cost several thousand Euros. There are also considerable issues with availability. The NETGEAR MS510TXP which has PoE and is < 400 Euros with an interesting mix of multi-gig ports seems to be not available in Europe since over a year. Compare that to the ridiculous price of the Zyxel XS1930-12HP of nearly 1000Euros, nearly 600 Euros just for PoE.

@anon13997276 Thanks for the information. Sounds like the RTL931X is too expensive and hard to find for my needs. The RTL930X seems to be the sweet spot for me.

At $200-225 for this switch with 24 POE ports and 4 10G uplinks, it seems hard to beat.

However, what other RTL9301 24 or 48 port switches have been tested, that do have the proper PSE / POE chipset? Is only the Broadcom PoE chipset currently supported, or TI or any others?

Maybe a bit of a background on the different SoCs:

1st Generation of Chips with very limited offloading capabilities:
RTL8380: Up to 24 GigPorts + 4SFP Ports
RTL8390: Same technology as RTL8380, but up to 48 Gig Ports + 4 SFP Ports

2nd Generation Chips with L3 offloading and multi-gig capabilities:
RTL9300: Up to 24 Multi-GBit ports (or 48 1Gbit ports) + 4 SFP+ ports
RTL9310: Up to 48 Multi-GBit ports + 4 SFP+ ports, dual core Mips Interaptive

You can find an (incomplete?) overview of these chips here:
https://www.realtek.com/en/products/communications-network-ics/category/managed-switch-controller
L2 manged: RTL83xx, L3 managed: RTL93xx
The total available bandwidth for the Ethernet ports on the 93xx is not clear to me, there does not appear to be e.g. an RTL931x 48x10Gbit configuration, but some chips seem to be missing from the overview.

2 Likes

DD-Wrt is a different router firmware project, they use old(er) kernel versions and use proprietary driver from hardware vendor (usually Broadcomm), and have a different web interface.

Just wondering, but looking at the chipsets on this page: https://wikidevi.wi-cat.ru/Realtek/SoC

Wondering if any of the realtek chips under the Unmanaged GbE (10/100/1000 Mbps) section are also supported. Example: RTL8370N. Basically the RTL836X and RTL837X

Most the chips we have been talking about are under the Switch SoC section, and have integrated CPUs.

afaik unmanaged switches are just the switching microcontrollers (think of an Arduino-like microprocessor dedicated to move packets) without a big CPU to run Linux.

They might be controllable over some i2C or SPI or whatever interface by something else (another microcontroller or a CPU running Linux) to do VLANs and other smart switch things, see this for example, that is designed to be soldered on a board and connected to a SoC that will control it https://www.semiconductorstore.com/cart/pc/viewPrd.asp?idproduct=96743

Some of those are integrated in consumer devices like a wifi router, but more and more devices have switching electronics integrated in the SoC with the main CPU now.

If they are used to make an "unmanaged switch" standalone device, there is no CPU or controller on their board.

These unmanaged Chips cannot run software from a flash, there is no DRAM interface. On reset they read configuration values from an EEPROM and off they go. And yes, they can be steered via SPI. There is even an API and SDK that was leaked. In principle the drivers we have could be used if one replaces the writing to the registers to writing to a remote register via SPI. One can even dedicate one Switch port as a CPU-Port.

Take a Raspeberry-Pi, connect it via SPI and to that CPU-Port and you can make a managed Switch out of an unmanaged one. You can basically make a managed switch for half the price with considerably more CPU-Power even. Or think big and put one of the RTL9300 unmanaged devices together with an x86 board into a desktop and you end up with a switch that does Multi-Gig CPU-based Routing and firewalling. I think I saw a project from someone doing that for an older RTL-chip (6502 CPU inside) with an Arduino.

The devil is in the details of course, like you need to solder to traces on the board for that SPI (I looked into that for a small 8-port switch), so I guess the user-community will be limited...

4 Likes

A question, I searched this thread about support for bonding (link aggregation or LAG) or VXLAN.
I think these features are supported in OpenWrt on everything at least in software (on CPU).
I wanted to know if in these devices the switch controller or some other hardware acceleration takes the load or is this done by CPU (and therefore the performance will not be good)?

I see that LAG at least seem to be OK on RTL931x Support for RTL838x based managed switches - #701 by kobi

The original LAG support was actually never tested until recently and there were a couple of bugs found. However, improved LAG support with many additional features has been implemented by brainslayer on top of this:

(see the pie branches).
The work probably needs my current PR for new features as it is built on top of it.

2 Likes