Support for RTL838x based managed switches

This is definitely the case for the timer (or maybe one can see it the other way around there: the timer creates per-cpu IRQs in order to allow more than one CPU to run), but it is also probably the key to better network performance of these devices, from the RTL8390 onward: the interrupt-routines for network RX/TX are relatively heavy and if you think about e.g. NAT, there is not much the other CPU could do in parallel. So one needs to balance the IRQs across the CPUs.

Sebastian's and my idea was to figure out strategies to improve performance on the RTL931X, where the IRQ infrastructure (balancing and affinity) and timers as well as SMP works out of the box. So once we are sure the drivers are safe to use under SMP and with balanced IRQs we can look at affinity settings and balancing for devices, with an evident focus on the Ethernet driver.

Sounds like a generic question unrelated to what's being discussed here. Better open a separate topic.

You could Block incoming packets on port 67 on all but the port where the real dhcp server sits. This should block rogue servers. It can be done with tc flower so works at the switch level entirely in hw with wire speed. This sounds very interesting. Please report back.

dhcp snooping is actually a function of L2 level switches, but I did a keyword search in the community, it seems that openwrt does not support dhcp snooping.
And those two device models are TP-Link switch models.

Yes, the official firmware of these two models of switches does not support dhcp snooping, this restriction may be quite common.
If some unmanaged switches can install openwrt, it might be very interesting. Usually these 24 or 48 port switches have better hardware performance, and the official firmware usually has many limitations.

The black hole mac address is also very interesting.

This is a Realtek thread. You don't even know what's in your devices:

This is not a TP-Link thread.

1 Like

A post was split to a new topic: OpenWrt installation on GS1900-10HP

Hi.

I have the XGS1010-12 switch (looks identical to XGS1210 but officially has no management support). Zyxel has no firmware to download for it. I opened it and it looks just like the 1210: (https://biot.com/switches/zyxel_xgs1210-12), with same 9302B chip and same RAM.

What is the easiest way to connect to the serial port? Do I need some special hardware? I have a USB->9pin serial adapter, and also an arduino if that is useful.

Can I dump out the current firmware via tftp from the bootloader? Can I test custom firmware by loading it directly to RAM and starting it from there (without touching the stock flash)?

1 Like

That would indeed be very interesting if this could run OpenWRT, it is considerably cheaper than the managed devices. The difference would be clearly in the Flash chip holding the OS and Web-Interface. Is that one identical, too?
You can connect your serial adapter to the serial interface that is accessible at the right, see the pin description on the page for the 1210. Connect GND <--> GND, TX <--> RX and RX <--> TX, do not connect 3.3V. Then press space or CTRL-C to stop the bootloader immediately after power on and once you are in the bootloader type "help" to get an overview of what is possible. It would be great if you could post the output here.

1 Like

It looks to be MX25L12833F as well. I guess it makes sense to make them as similar as possible.
I ordered a 3.3v-capable USB adapter and will try connecting it next week.

I looked at the XGS 1210 GPL dump and it has 1210 and 1250 mentioned but not 1010. It seems the zyxel GPL form requires a firmware version, hopefully I can find a one from watching it boot.

XGS1010-12:

That's incredible. This looks like a fully fledged XGS-1210-12 with 16GB flash. It should be possible to get OpenWRT running. Did you manage to get serial console access?

Probably rather 16MB :stuck_out_tongue_winking_eye:.

1 Like

Indeed I got a bit excited, there :wink:

1 Like

Will try once I get this adapter: https://cdn-reichelt.de/bilder/web/xxl_ws/A300/RPI_USB_TTL_01.png

From what I read on the openwrt wiki I should not connect my 9-pin to it.

Yes, please don't do that!

Best would be to hook up a logic analyzer. Then one would know within seconds which pin is a transmitting UART. If there indeed would be one.

That should work. But I rather recommend an FTDI with switchable voltage level as newer chip sets often use 1.8 volt rather than 3.3 volt logic level.

Also check here:

Thanks. I ordered an 1.8V-capable one as well. Since https://biot.com/switches/zyxel_xgs1210-12 lists 3.3V I thought it should be safe here. I will verify that I have 3.3v also once I get dupont cables, it was too tricky to measure in place.

Is it safest to only connect GND and device TX first?

I've written an implementation of the timer driver for mainline, and it boots on RTL9300 (XGS1250-12) with MIPS_GENERIC! However, there are still some issues.

As shown in the boot log below, there is a ~7.3s pause (similar to the clock's max_idle_ns) when the kernel switches to interrupts/events. This happens independent of whether I include CEVT_R4K timer in my build. When included, the CEVT_R4K timer doesn't produce any interrupts. So it really appears to be missing, but is somehow not broken enough to be disabled?

Now, this builds also doesn't have proper CPU affinity support, while it is booting with both VPEs enabled, so that's also an issue for sure.

[    0.000000] Linux version 5.16.0-rc8-00118-gf0ca975e8f6a-dirty (sander@terra) (mips-buildroot-linux-uclibc-gcc.br_real (Buildroot 2021.02.7) 10.3.0, GNU ld (GNU Binutils) 2.36.1) #937 SMP Sun Jan 16 09:20:34 CET 2022
[    0.000000] CPU0 revision is: 00019555 (MIPS 34Kc)
[    0.000000] MIPS: machine is Zyxel XGS1250-12 Switch
[    0.000000] earlycon: ns16550a0 at MMIO 0x18002000 (options '115200n8')
[    0.000000] printk: bootconsole [ns16550a0] enabled
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Detected 1 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] percpu: Embedded 15 pages/cpu s29552 r8192 d23696 u61440
[    0.000000] pcpu-alloc: s29552 r8192 d23696 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: earlycon
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=0000b0da
[    0.000000] Readback ErrCtl register=0000b0da
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 112748K/131072K available (7754K kernel code, 818K rwdata, 1400K rodata, 6656K init, 256K bss, 18324K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] ftrace: allocating 22763 entries in 45 pages
[    0.000000] ftrace: allocated 45 pages with 4 groups
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] 	Rude variant of Tasks RCU enabled.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x400/0x60c with crng_init=0
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[    0.000003] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[    0.013732] Console: colour dummy device 80x25
[    0.021510] printk: console [tty0] enabled
[    0.028651] printk: bootconsole [ns16550a0] disabled
[    0.037379] Calibrating delay loop... 408965.12 BogoMIPS (lpj=817930240)
[    2.444890] pid_max: default: 32768 minimum: 301
[    2.445232] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    2.445327] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    2.451607] rcu: Hierarchical SRCU implementation.
[    2.453583] smp: Bringing up secondary CPUs ...
[    2.455745] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    2.455812] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    2.455944] CPU1 revision is: 00019555 (MIPS 34Kc)
[    4.899178] Synchronize counters for CPU 1: done.
[    4.899749] smp: Brought up 1 node, 2 CPUs
[    4.901480] devtmpfs: initialized
[    4.907356] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    4.907498] futex hash table entries: 512 (order: 2, 16384 bytes, linear)
[    4.907935] pinctrl core: initialized pinctrl subsystem
[    4.909166] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    4.910641] thermal_sys: Registered thermal governor 'step_wise'
[    4.969357] clocksource: Switched to clocksource MIPS
[    5.048109] NET: Registered PF_INET protocol family
[    5.048762] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    5.050869] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    5.051307] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    5.051666] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    5.051903] TCP: Hash tables configured (established 1024 bind 1024)
[    5.052396] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    5.052739] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    5.053642] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    5.054245] debugfs: File ':soc@18000000:rtlintc@3000' in directory 'domains' already present!
[    5.054609] debugfs: File ':soc@18000000:rtlintc@3000' in directory 'domains' already present!
[    5.054909] debugfs: File ':soc@18000000:rtlintc@3000' in directory 'domains' already present!
[    5.055211] debugfs: File ':soc@18000000:rtlintc@3000' in directory 'domains' already present!
[    5.059332] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    5.092224] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    5.092470] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    5.100947] io scheduler mq-deadline registered
[    5.101203] io scheduler kyber registered
[    5.372420] random: fast init done
[    5.897965] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    5.902107] serial8250 serial8250: no of_node; not parsing pinctrl DT
[    5.905945] 18002000.uart: ttyS0 at MMIO 0x18002000 (irq = 30, base_baud = 10937500) is a 16550A
[   13.196587] printk: console [ttyS0] enabled
[   13.319300] brd: module loaded
[   13.381570] libphy: Fixed MDIO Bus: probed
[   13.463583] i2c_dev: i2c /dev entries driver
[   13.549538] drop_monitor: Initializing network drop monitor service
[   13.640226] NET: Registered PF_INET6 protocol family
[   13.717879] Segment Routing with IPv6
[   13.769684] In-situ OAM (IOAM) with IPv6
[   13.825211] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[   13.911521] NET: Registered PF_PACKET protocol family
[   14.008108] 8021q: 802.1Q VLAN Support v1.8
[   14.140436] Freeing unused kernel image (initmem) memory: 6656K
[   14.224095] This architecture does not have kernel memory protection.
[   14.315052] Run /init as init process
[   14.366708]   with arguments:
[   14.408538]     /init
[   14.440544]   with environment:
[   14.484826]     HOME=/
[   14.518059]     TERM=linux
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Saving random seed: [   14.856754] random: dd: uninitialized urandom read (512 bytes read)
OK
Starting network: OK

Welcome to Buildroot
rtl83xx login: root
# cat /proc/interrupts 
           CPU0       CPU1       
  7:          0          0      MIPS   7  timer
  8:         13          0  realtek-rtl-intc   7  timer@3200
  9:          0          0  realtek-rtl-intc   8  timer@3210
 10:          0          0  realtek-rtl-intc   9  timer@3220
 11:          0          0  realtek-rtl-intc  10  timer@3230
 12:          0          0  realtek-rtl-intc  11  timer@3240
 13:          0          0  realtek-rtl-intc  12  timer@3250
 14:        191        578      MIPS   0  IPI call
 15:        705        143      MIPS   1  IPI resched
 16:          0          0  realtek-rtl-intc   5  realtek-otto-wdt
 30:        255          0  realtek-rtl-intc  30  ttyS0
ERR:          0
1 Like

Have you tried running the new timer driver

which is CEVT-only, has VPE and CPU-affinity support and allows booting XGS1250-12 under VSMP in comparison? Since it is CEVT-only it should also simply work with MIPS_GENERIC, although since CEVT_R4K does not work because the MIPS R4K timer IRQ is not connected, a similar lag should be seen on startup, unless one explicitly calls it for any CPU that is being brought up in the SMP support code.

BTW: The XGS1210 works very nicely now even under VSMP:


[    0.000000] Linux version 5.10.88 (birger@AMDDesktop) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r18457+28-4b587f2561) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Thu Jan 13 17:48:06 2022
[    0.000000] RTL838X model is 0
[    0.000000] RTL839X model is 0
[    0.000000] RTL93XX model is 93021001
[    0.000000] SoC Type: RTL9302B
[    0.000000] Kernel command line: 
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019555 (MIPS 34Kc)
[    0.000000] MIPS: machine is Zyxel XGS1250-12 Switch
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Using appended Device Tree.
[    0.000000] Detected 1 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000]   Normal zone: 288 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] percpu: Embedded 14 pages/cpu s26480 r8192 d22672 u57344
[    0.000000] pcpu-alloc: s26480 r8192 d22672 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=000201ec
[    0.000000] Readback ErrCtl register=000201ec
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 112232K/131072K available (5977K kernel code, 609K rwdata, 1240K rodata, 9380K init, 206K bss, 18840K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x32c/0x544 with crng_init=0
[    0.000000] CPU frequency from device tree: 800MHz
[    0.000000] rtl9300_clockevent_init called for cpu0
[    0.000000] rtl9300_clockevent_init using IRQ 8
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4778151116 ns
[    0.000008] sched_clock: 32 bits at 400MHz, resolution 2ns, wraps every 5368709118ns
[    0.008514] Calibrating delay loop... 531.66 BogoMIPS (lpj=2658304)
[    0.067049] pid_max: default: 32768 minimum: 301
[    0.072272] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.080141] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.091840] rcu: Hierarchical SRCU implementation.
[    0.097405] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.106136] smp: Bringing up secondary CPUs ...
[    0.112149] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.112161] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.112244] rtl9300_clockevent_init called for cpu1
[    0.112306] rtl9300_clockevent_init using IRQ 11
[    0.112367] CPU1 revision is: 00019555 (MIPS 34Kc)
[    0.170369] Synchronize counters for CPU 1: done.
[    0.206596] smp: Brought up 1 node, 2 CPUs
[    0.214048] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.224745] futex hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.232276] pinctrl core: initialized pinctrl subsystem
[    0.238529] NET: Registered protocol family 16
[    0.312240] clocksource: Switched to clocksource MIPS
[    0.320570] NET: Registered protocol family 2
[    0.325628] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.334747] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.343969] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.352379] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.360060] TCP: Hash tables configured (established 1024 bind 1024)
[    0.367284] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.374487] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.382735] NET: Registered protocol family 1
[    0.552750] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.564372] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.570638] jffs2: version 2.2 (NAND) (SUMMARY) (ZLIB) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.582194] random: fast init done
[    0.674826] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.683799] printk: console [ttyS0] disabled
[    0.688551] 18002000.uart: ttyS0 at MMIO 0x18002000 (irq = 30, base_baud = 10937500) is a 16550A
[    0.698215] printk: console [ttyS0] enabled
[    0.698215] printk: console [ttyS0] enabled
[    0.707516] printk: bootconsole [early0] disabled
[    0.707516] printk: bootconsole [early0] disabled
[    0.894743] brd: module loaded
[    0.901418] spi-nor spi0.0: mx25l12805d (16384 Kbytes)
[    0.907376] 6 fixed-partitions partitions found on MTD device spi0.0
[    0.914649] Creating 6 MTD partitions on "spi0.0":
[    0.919987] 0x000000000000-0x0000000e0000 : "u-boot"
[    0.926818] 0x0000000e0000-0x0000000f0000 : "u-boot-env"
[    0.934896] 0x0000000f0000-0x000000100000 : "u-boot-env2"
[    0.942446] 0x000000100000-0x000000200000 : "jffs"
[    0.950189] 0x000000200000-0x000000300000 : "jffs2"
[    0.956889] 0x000000300000-0x000001000000 : "firmware"
[    0.983726] libphy: Fixed MDIO Bus: probed
[    0.993607] Probing RTL838X eth device pdev: 820af800, dev: 820af810
[    1.019586] Found SoC ID: 9302: RTL9302B, family 9300
[    1.025312] Using MAC 000000e04c000000
[    1.029677] rtl838x_mdio_init: port 0
[    1.033866] rtl838x_mdio_init: port 1
[    1.038025] rtl838x_mdio_init: port 2
[    1.042270] rtl838x_mdio_init: port 3
[    1.046438] rtl838x_mdio_init: port 4
[    1.050605] rtl838x_mdio_init: port 5
[    1.054865] rtl838x_mdio_init: port 6
[    1.059034] rtl838x_mdio_init: port 7
[    1.063231] rtl838x_mdio_init: port 24
[    1.067483] set sds port 24 to 6
[    1.071155] rtl838x_mdio_init: port 25
[    1.075441] set sds port 25 to 7
[    1.079117] rtl838x_mdio_init: port 26
[    1.083390] set sds port 26 to 8
[    1.087068] rtl838x_mdio_init: port 27
[    1.091323] set sds port 27 to 9
[    1.095013] rtl838x_mdio_init: port 28
[    1.099269] rtl838x-eth 1b00a300.ethernet: Port node 28 misses phy-handle
[    1.108113] c45_mask: 000e0000
[    1.111581] libphy: rtl930x-eth-mdio: probed
[    1.778542] rtl9300_configure_serdes: Port 27, SerDes is 9
[    1.784877] REALTEK RTL9300 SERDES mdio-bus:1b: Configuring internal RTL9300 SERDES 9
[    1.794648] rtl9300_configure_serdes: enabling link as speed 10G, link down
[    1.802440] rtl9300_configure_serdes, RTL930X_MAC_FORCE_MODE_CTRL : 000001a4
[    1.810275] rtl9300_configure_serdes, RTL930X_MAC_FORCE_MODE_CTRL after: 000001a5
[    1.838665] rtl9300_sds_rst 26
[    1.864200] rtl9300_serdes_mac_link_config: registers before 00000000 00001403
[    1.874298] rtl9300_serdes_mac_link_config: registers after 00000000 00001403
[    1.883277] rtl9300_configure_serdes 1gbit phy: 00001140
[    1.889183] rtl9300_configure_serdes 1gbit phy enabled: 00001140
[    1.896906] rtl9300_configure_serdes 10gbit phy: 00002040
[    1.902968] rtl9300_configure_serdes 10gbit phy after: 00002040
[    1.909555] rtl9300_force_sds_mode: SDS: 9, mode 0
[    1.923946] rtl9300_force_sds_mode: SDS: 9, mode 25
[    6.661201] rtl9300_configure_serdes: setting 1/10G fibre medium, mode 1a
[    6.668800] rtl9300_sds_rst 26
[    6.698450] rtl9300_i2c_probe probing I2C adapter
[    6.703992] i2c-rtl9300 1b00036c.i2c-rtl9300: SCL speed 100000, mode is 0
[    6.711605] rtl9300_i2c_probe scl_num 0
[    6.715965] rtl9300_i2c_probe sda_num 1
[    6.724116] NET: Registered protocol family 10
[    6.740188] Segment Routing with IPv6
[    6.744464] NET: Registered protocol family 17
[    6.750017] 8021q: 802.1Q VLAN Support v1.8
[    6.755376] sfp: probe of sfp-p12 failed with error -22
[    7.140554] libphy: rtl838x slave mii: probed
[    7.145682] rtl83xx_mdio_probe found port 0
[    7.150421] rtl83xx_mdio_probe found port 1
[    7.155195] rtl83xx_mdio_probe found port 2
[    7.159852] rtl83xx_mdio_probe found port 3
[    7.164572] rtl83xx_mdio_probe found port 4
[    7.169227] rtl83xx_mdio_probe found port 5
[    7.173928] rtl83xx_mdio_probe found port 6
[    7.178582] rtl83xx_mdio_probe found port 7
[    7.183299] rtl83xx_mdio_probe found port 24
[    7.188054] rtl83xx_mdio_probe found port 25
[    7.192861] rtl83xx_mdio_probe found port 26
[    7.197612] rtl83xx_mdio_probe found port 27
[    7.202421] rtl83xx_mdio_probe found port 28
[    7.207182] rtl83xx-switch switch@1b000000: Port node 28 misses phy-handle
[    7.229105] rtl93xx_setup called
[    7.232820] In rtl83xx_vlan_setup
[    7.236506] In rtl930x_vlan_profile_setup
[    7.240957] In rtl930x_vlan_profile_setup
[    7.245472] UNKNOWN_MC_PMASK: 000000001fffffff
[    7.250415] VLAN 0: L2 learn: 0; Unknown MC PMasks: L2 1fffffff, IPv4 1fffffff, IPv6: 1fffffff
[    7.250422]   Routing enabled: IPv4 UC y, IPv6 UC y, IPv4 MC y, IPv6 MC y
[    7.267604]   Bridge enabled: IPv4 MC n, IPv6 MC n,
[    7.273079] VLAN profile 0: raw 00033000 00000000 1fffffff 1fffffff 1fffffff
[    8.302247] rtl83xx_enable_phy_polling:          f0000ff
[    8.308165] rtl930x_pie_init
[    8.311965] rtl83xx-switch switch@1b000000 lan1 (uninitialized): PHY [mdio-bus:01] driver [REALTEK RTL8218D] (irq=POLL)
[    8.326009] rtl83xx-switch switch@1b000000 lan2 (uninitialized): PHY [mdio-bus:02] driver [REALTEK RTL8218D] (irq=POLL)
[    8.340231] rtl83xx-switch switch@1b000000 lan3 (uninitialized): PHY [mdio-bus:03] driver [REALTEK RTL8218D] (irq=POLL)
[    8.354353] rtl83xx-switch switch@1b000000 lan4 (uninitialized): PHY [mdio-bus:04] driver [REALTEK RTL8218D] (irq=POLL)
[    8.368574] rtl83xx-switch switch@1b000000 lan5 (uninitialized): PHY [mdio-bus:05] driver [REALTEK RTL8218D] (irq=POLL)
[    8.383009] rtl83xx-switch switch@1b000000 lan6 (uninitialized): PHY [mdio-bus:06] driver [REALTEK RTL8218D] (irq=POLL)
[    8.397227] rtl83xx-switch switch@1b000000 lan7 (uninitialized): PHY [mdio-bus:07] driver [REALTEK RTL8218D] (irq=POLL)
[    8.411456] rtl83xx-switch switch@1b000000 lan8 (uninitialized): PHY [mdio-bus:08] driver [REALTEK RTL8218D] (irq=POLL)
[    8.426288] Aquantia AQR113C mdio-bus:18: FW 5.4, Build 10, Provisioning 1
[    8.434711] rtl83xx-switch switch@1b000000 lan9 (uninitialized): PHY [mdio-bus:18] driver [Aquantia AQR113C] (irq=POLL)
[    8.449350] Aquantia AQR113C mdio-bus:19: FW 5.4, Build 10, Provisioning 1
[    8.457572] rtl83xx-switch switch@1b000000 lan10 (uninitialized): PHY [mdio-bus:19] driver [Aquantia AQR113C] (irq=POLL)
[    8.472325] Aquantia AQR113C mdio-bus:1a: FW 5.4, Build 10, Provisioning 1
[    8.480744] rtl83xx-switch switch@1b000000 lan11 (uninitialized): PHY [mdio-bus:1a] driver [Aquantia AQR113C] (irq=POLL)
[    8.494746] rtl83xx-switch switch@1b000000: Unsupported interface: 25 for port 27
[    8.503263] rtl83xx-switch switch@1b000000: Unsupported interface: 25 for port 27
[    8.511673] rtl83xx-switch switch@1b000000 lan12 (uninitialized): fixed link full duplex 10000Mbps not recognised
[    8.525029] rtl83xx-switch switch@1b000000: configuring for fixed/internal link mode
[    8.533770] rtl93xx_phylink_mac_config port 28, mode 1, phy-mode: internal, speed 10000, link 0
[    8.544089] DSA: tree 0 setup
[    8.547528] LINK state irq: 23
[    8.551006] In rtl83xx_setup_qos
[    8.554703] L3_IPUC_ROUTE_CTRL 00002000, IPMC_ROUTE 0000077e, IP6UC_ROUTE 00014400, IP6MC_ROUTE 0001db7e
[    8.565309] L3_IPUC_ROUTE_CTRL 00002001, IPMC_ROUTE 00000501, IP6UC_ROUTE 00014581, IP6MC_ROUTE 00012881
[    8.575898] L3_IP_ROUTE_CTRL 0000013f
[    8.580065] rtl930x_dbgfs_init called
[    8.625867] Freeing unused kernel memory: 9380K
[    8.630916] This architecture does not have kernel memory protection.
[    8.638144] Run /init as init process
[    8.642282]   with arguments:
[    8.645580]     /init
[    8.648097]   with environment:
[    8.651573]     HOME=/
[    8.654250]     TERM=linux
[    8.657463] rtl93xx_phylink_mac_config port 28, mode 1, phy-mode: internal, speed 10000, link 1
[    8.667331] rtl83xx-switch switch@1b000000: Link is Up - 10Gbps/Full - flow control off
[    8.676392] rtl83xx_fib_event_work_do: FIB4 default rule failed
[    9.189720] init: Console is alive
[    9.194073] init: - watchdog -
[    9.212443] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    9.221832] gpio-keys keys: failed to get irq for gpio:-2
[    9.229993] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    9.249463] init: - preinit -
[    9.480764] random: jshn: uninitialized urandom read (4 bytes read)
[    9.575686] random: jshn: uninitialized urandom read (4 bytes read)
[   10.161758] random: jshn: uninitialized urandom read (4 bytes read)
[   10.370008] RESETTING 9300, CPU_PORT 28
[   10.574937] rtl838x-eth 1b00a300.ethernet eth0: configuring for fixed/internal link mode
[   10.583985] In rtl838x_mac_config, mode 1
[   10.589241] rtl83xx-switch switch@1b000000 lan1: configuring for phy/qsgmii link mode
[   10.598050] rtl93xx_phylink_mac_config port 0, mode 0, phy-mode: qsgmii, speed -1, link 0
[   10.607217] rtl93xx_phylink_mac_config SDS is -1
[   10.612810] 8021q: adding VLAN 0 to HW filter on device lan1
[   10.619432] In rtl838x_mac_config, mode 1
[   10.624094] rtl838x-eth 1b00a300.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   10.635917] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.643093] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[   10.650544] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[   10.658397] rtl93xx_phylink_mac_config port 0, mode 0, phy-mode: qsgmii, speed 1000, link 1
[   10.659284] rtl83xx_fib_event_work_do: FIB4 failed
[   10.667836] rtl93xx_phylink_mac_config SDS is -1
[   10.678446] rtl83xx-switch switch@1b000000 lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   10.679588] rtl83xx_fib_event_work_do: FIB4 failed
[   10.693698] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
[   10.701221] rtl83xx_fib_event_work_do: FIB4 failed
[   10.706913] rtl83xx_fib_event_work_do: FIB4 failed
[   10.706930] rtl93xx_phylink_mac_config port 0, mode 0, phy-mode: qsgmii, speed 1000, link 1
[   10.706950] rtl93xx_phylink_mac_config SDS is -1
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   12.222288] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[   14.852948] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[   14.858687] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[   14.865488] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[   14.871297] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[   14.879366] rtl83xx-switch switch@1b000000 lan1: Link is Down
[   14.897159] procd: - early -
[   14.900740] procd: - watchdog -
[   16.180499] procd: - watchdog -
[   16.184723] procd: - ubus -
[   16.197107] urandom_read: 2 callbacks suppressed
[   16.197117] random: ubusd: uninitialized urandom read (4 bytes read)
[   16.238437] random: ubusd: uninitialized urandom read (4 bytes read)
[   16.246305] random: ubusd: uninitialized urandom read (4 bytes read)
[   16.258386] procd: - init -
Please press Enter to activate this console.
[   16.840247] kmodloader: loading kernel modules from /etc/modules.d/*
[   16.899188] xt_time: kernel timezone is -0000
[   16.929887] kmodloader: done loading kernel modules from /etc/modules.d/*
[   17.028264] urngd: v1.0.2 started.
[   17.225455] random: crng init done
[   17.229253] random: 2 urandom warning(s) missed due to ratelimiting
[   20.323658] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[   45.604877] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[   45.647488] in rtl838x_eth_stop
BusyBox v1.34.1 (2022-01-10 08:48:50 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r18457+30-4b587f2561
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# vi /etc/config/network 
root@OpenWrt:/# /etc/init.d/network restart
[SNIP-SNIP]
[55053.833106] rtl838x-eth 1b00a300.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[55053.847976] rtl83xx-switch switch@1b000000 lan1: configuring for phy/qsgmii link mode
[55053.856958] rtl93xx_phylink_mac_config port 0, mode 0, phy-mode: qsgmii, speed 1000, link 0
[55053.866358] rtl93xx_phylink_mac_config SDS is -1
[55053.871910] 8021q: adding VLAN 0 to HW filter on device lan1
[55053.879858] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[55053.887129] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[55053.894802] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[55053.906105] rtl93xx_phylink_mac_config port 0, mode 0, phy-mode: qsgmii, speed 1000, link 1
[55053.915613] rtl93xx_phylink_mac_config SDS is -1
[55053.920838] rtl83xx-switch switch@1b000000 lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[55053.932115] switch: port 1(lan1) entered blocking state
[55053.938372] switch: port 1(lan1) entered disabled state
[55053.945197] device lan1 entered promiscuous mode
[55053.950408] device eth0 entered promiscuous mode
[55053.958113] rtl93xx_phylink_mac_config port 0, mode 0, phy-mode: qsgmii, speed 1000, link 1
[55053.967541] rtl93xx_phylink_mac_config SDS is -1
[55053.982677] switch: port 1(lan1) entered blocking state
[55053.988585] switch: port 1(lan1) entered forwarding state
[55054.009440] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[55054.018125] rtl83xx_fib_event_work_do: FIB4 default rule failed
[55054.027716] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[55054.053367] rtl83xx-switch switch@1b000000 lan2: configuring for phy/qsgmii link mode
[55054.062136] rtl93xx_phylink_mac_config port 1, mode 0, phy-mode: qsgmii, speed -1, link 0
[55054.071505] rtl93xx_phylink_mac_config SDS is -1
[55054.077258] 8021q: adding VLAN 0 to HW filter on device lan2
[55054.087708] switch: port 2(lan2) entered blocking state
[55054.093849] switch: port 2(lan2) entered disabled state
[55054.100383] device lan2 entered promiscuous mode
[55054.142889] rtl83xx-switch switch@1b000000 lan3: configuring for phy/qsgmii link mode
[55054.151680] rtl93xx_phylink_mac_config port 2, mode 0, phy-mode: qsgmii, speed -1, link 0
[55054.160926] rtl93xx_phylink_mac_config SDS is -1
[55054.166691] 8021q: adding VLAN 0 to HW filter on device lan3
[55054.186827] switch: port 3(lan3) entered blocking state
[55054.192806] switch: port 3(lan3) entered disabled state
[55054.199419] device lan3 entered promiscuous mode
[55054.223923] rtl83xx-switch switch@1b000000 lan4: configuring for phy/qsgmii link mode
[55054.232780] rtl93xx_phylink_mac_config port 3, mode 0, phy-mode: qsgmii, speed -1, link 0
[55054.241938] rtl93xx_phylink_mac_config SDS is -1
[55054.247727] 8021q: adding VLAN 0 to HW filter on device lan4
[55054.263307] switch: port 4(lan4) entered blocking state
[55054.269216] switch: port 4(lan4) entered disabled state
[55054.278546] device lan4 entered promiscuous mode
[55054.303975] rtl83xx-switch switch@1b000000 lan5: configuring for phy/qsgmii link mode
[55054.312882] rtl93xx_phylink_mac_config port 4, mode 0, phy-mode: qsgmii, speed -1, link 0
[55054.322042] rtl93xx_phylink_mac_config SDS is -1
[55054.327693] 8021q: adding VLAN 0 to HW filter on device lan5
[55054.337336] switch: port 5(lan5) entered blocking state
[55054.343590] switch: port 5(lan5) entered disabled state
[55054.351570] device lan5 entered promiscuous mode
[55054.375348] rtl83xx-switch switch@1b000000 lan6: configuring for phy/qsgmii link mode
[55054.384201] rtl93xx_phylink_mac_config port 5, mode 0, phy-mode: qsgmii, speed -1, link 0
[55054.393467] rtl93xx_phylink_mac_config SDS is -1
[55054.398989] 8021q: adding VLAN 0 to HW filter on device lan6
[55054.408948] switch: port 6(lan6) entered blocking state
[55054.414962] switch: port 6(lan6) entered disabled state
[55054.421566] device lan6 entered promiscuous mode
[55054.441468] rtl83xx-switch switch@1b000000 lan7: configuring for phy/qsgmii link mode
[55054.450386] rtl93xx_phylink_mac_config port 6, mode 0, phy-mode: qsgmii, speed -1, link 0
[55054.459711] rtl93xx_phylink_mac_config SDS is -1
[55054.465734] 8021q: adding VLAN 0 to HW filter on device lan7
[55054.475532] switch: port 7(lan7) entered blocking state
[55054.481423] switch: port 7(lan7) entered disabled state
[55054.488055] device lan7 entered promiscuous mode
[55054.507629] rtl83xx-switch switch@1b000000 lan8: configuring for phy/qsgmii link mode
[55054.516501] rtl93xx_phylink_mac_config port 7, mode 0, phy-mode: qsgmii, speed -1, link 0
[55054.525700] rtl93xx_phylink_mac_config SDS is -1
[55054.531313] 8021q: adding VLAN 0 to HW filter on device lan8
[55054.540148] IPv6: ADDRCONF(NETDEV_CHANGE): switch: link becomes ready
[55054.549668] switch: port 8(lan8) entered blocking state
[55054.555623] switch: port 8(lan8) entered disabled state
[55054.562092] device lan8 entered promiscuous mode
[55054.581454] rtl83xx-switch switch@1b000000 lan9: configuring for phy/usxgmii link mode
[55054.590341] rtl93xx_phylink_mac_config port 24, mode 0, phy-mode: usxgmii, speed -1, link 0
[55054.599723] rtl93xx_phylink_mac_config SDS is 6
[55054.605166] rtl9300_sds_rst 13
[55054.629195] 8021q: adding VLAN 0 to HW filter on device lan9
[55054.638343] switch: port 9(lan9) entered blocking state
[55054.644578] switch: port 9(lan9) entered disabled state
[55054.651108] device lan9 entered promiscuous mode
[55054.666940] rtl83xx-switch switch@1b000000 lan10: configuring for phy/usxgmii link mode
[55054.675975] rtl93xx_phylink_mac_config port 25, mode 0, phy-mode: usxgmii, speed -1, link 0
[55054.685639] rtl93xx_phylink_mac_config SDS is 7
[55054.690930] rtl9300_sds_rst 13
[55054.715056] 8021q: adding VLAN 0 to HW filter on device lan10
[55054.724494] switch: port 10(lan10) entered blocking state
[55054.730514] switch: port 10(lan10) entered disabled state
[55054.737494] device lan10 entered promiscuous mode
[55054.753260] rtl83xx-switch switch@1b000000 lan11: configuring for phy/usxgmii link mode
[55054.762283] rtl93xx_phylink_mac_config port 26, mode 0, phy-mode: usxgmii, speed -1, link 0
[55054.771583] rtl93xx_phylink_mac_config SDS is 8
[55054.776705] rtl9300_sds_rst 13
[55054.800813] 8021q: adding VLAN 0 to HW filter on device lan11
[55054.809960] switch: port 11(lan11) entered blocking state
[55054.816370] switch: port 11(lan11) entered disabled state
[55054.822984] device lan11 entered promiscuous mode
[55054.838666] rtl83xx-switch switch@1b000000 lan12: configuring for fixed/10gbase-r link mode
[55054.848104] rtl93xx_phylink_mac_config port 27, mode 1, phy-mode: 10gbase-r, speed 10000, link 0
[55054.858257] rtl93xx_phylink_mac_config SDS is -1
[55054.863987] 8021q: adding VLAN 0 to HW filter on device lan12
[55054.870674] rtl93xx_phylink_mac_config port 27, mode 1, phy-mode: 10gbase-r, speed 10000, link 1
[55054.872987] switch: port 12(lan12) entered blocking state
[55054.880581] rtl93xx_phylink_mac_config SDS is -1
[55054.886560] switch: port 12(lan12) entered disabled state
[55054.891695] rtl83xx-switch switch@1b000000 lan12: Link is Up - 10Gbps/Full - flow control rx/tx
[55054.898282] device lan12 entered promiscuous mode
[55054.914618] switch: port 12(lan12) entered blocking state
[55054.920670] switch: port 12(lan12) entered forwarding state
[55054.934183] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[55054.943231] rtl83xx_fib_event_work_do: FIB4 default rule failed
[55055.423342] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[55055.430789] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[55055.743308] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[55055.750848] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported

root@OpenWrt:/# [55066.383143] rtl83xx-switch switch@1b000000 lan1: Link is Down
[55066.389676] switch: port 1(lan1) entered disabled state
[55073.344749] rtl93xx_phylink_mac_config port 24, mode 0, phy-mode: usxgmii, speed 2500, link 1
[55073.354291] rtl93xx_phylink_mac_config SDS is 6
[55073.359325] rtl9300_sds_rst 13
[55073.383028] rtl83xx-switch switch@1b000000 lan9: Link is Up - 2.5Gbps/Full - flow control rx/tx
[55073.392817] switch: port 9(lan9) entered blocking state
[55073.393768] rtl93xx_phylink_mac_config port 24, mode 0, phy-mode: usxgmii, speed 2500, link 1
[55073.398644] switch: port 9(lan9) entered forwarding state
[55073.408227] rtl93xx_phylink_mac_config SDS is 6
[55073.419341] rtl9300_sds_rst 13

root@OpenWrt:/# ping 192.168.2.150
PING 192.168.2.150 (192.168.2.150): 56 data bytes
64 bytes from 192.168.2.150: seq=0 ttl=64 time=1.280 ms
64 bytes from 192.168.2.150: seq=1 ttl=64 time=0.851 ms
^C
--- 192.168.2.150 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.851/1.065/1.280 ms

root@OpenWrt:/# cat /proc/cpuinfo 
system type             : RTL9302B
machine                 : Zyxel XGS1250-12 Switch
processor               : 0
cpu model               : MIPS 34Kc V5.5
BogoMIPS                : 531.66
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
Options implemented     : tlb 4kex 4k_cache 32fpr prefetch mcheck ejtag llsc pindexed_dcache userlocal vint perf_cntr_intr_bit perf
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VPE                     : 0
VCED exceptions         : not available
VCEI exceptions         : not available

processor               : 1
cpu model               : MIPS 34Kc V5.5
BogoMIPS                : 531.66
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
Options implemented     : tlb 4kex 4k_cache 32fpr prefetch mcheck ejtag llsc pindexed_dcache userlocal vint perf_cntr_intr_bit perf
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VPE                     : 1
VCED exceptions         : not available
VCEI exceptions         : not available

root@OpenWrt:/# cat /proc/interrupts 
           CPU0       CPU1       
  8:    5619779          0  realtek-rtl-intc   7  rtl9300-counter-0
  9:       7236       5800      MIPS   0  IPI call
 10:        906       1095      MIPS   1  IPI resched
 11:          0    5516162  realtek-rtl-intc   8  rtl9300-counter-1
 12:          0          0  realtek-rtl-intc   5  realtek-otto-wdt
 23:          5          5  realtek-rtl-intc  23  rtl930x-link-state
 24:        149        349  realtek-rtl-intc  24  eth0
 30:       4760       2037  realtek-rtl-intc  30  ttyS0
ERR:         23