Kernel 6.1 for realtek target: debugging & testing needed

What I see on v6.1 is that the VLAN_EGR_FILTER_DROP counter in /sys/kernel/debug/rtl838x/drop_counters increases with about the amount of missing egress packets.

But doing a bit of testing here teaches me the same lesson I've learned before: There's something really fishy with our VLAN filtering. Untagged traffic from the switch CPU doesn't necessarily work in v5.15 either.

Configuring this and pinging 192.168.1.1 on lan1 dowes not work in either version:

root@OpenWrt:/# bridge vlan
port              vlan-id  
lan1              43 PVID Egress Untagged
lan2              1 PVID Egress Untagged
lan3              1 PVID Egress Untagged
lan4              1 PVID Egress Untagged
lan5              1 PVID Egress Untagged
lan6              1 PVID Egress Untagged
lan7              1 PVID Egress Untagged
lan8              1 PVID Egress Untagged
switch            43

root@OpenWrt:/# ifconfig switch.43
switch.43 Link encap:Ethernet  HWaddr BC:A5:11:9F:E1:23  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::bea5:11ff:fe9f:e123/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:94 errors:0 dropped:0 overruns:0 frame:0
          TX packets:101 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5274 (5.1 KiB)  TX bytes:6094 (5.9 KiB)

But by pure magic, if I add vid 1 to lan1 then it starts working in v5.15. I.e.

root@OpenWrt:/# bridge vlan add vid 1 dev lan1
root@OpenWrt:/# bridge vlan
port              vlan-id  
lan1              1
                  43 PVID Egress Untagged
lan2              1 PVID Egress Untagged
lan3              1 PVID Egress Untagged
lan4              1 PVID Egress Untagged
lan5              1 PVID Egress Untagged
lan6              1 PVID Egress Untagged
lan7              1 PVID Egress Untagged
lan8              1 PVID Egress Untagged
switch            43

This should not have made any difference. And it doesn't in v6.1. Adding any other vid makes no difference. But we know vid 1 is special. Just wonder what makes it so special.

There is also another difference. In v5.15 I see broadcasts etc from all vids when snooping on "switch", whether the bridge is a member of that vlan or not. In v6.1 it looks like egress filtering on the cpu port works, and I only see traffic on the configured vids.

2 Likes