Is there a way setup vlan for eth1(left SFP port) for BPI-R3

Tried to set up gpon stick for bpi-r3 which required me set eth1 with vlan 41, however, it just won’t work. I read frank-w’s website it says eth1 doesn’t support vlan in linux 6.1. Is there any other way to use eth1 with vlan? Or will it be fixed in linux 6.6 as snapshot start to use linux 6.6 for testing now.

And the sfp port with mt7531 is working fine, but i need sfp1 to connect my 2.5gbe switch.

Which system (image,kernel) do you use? Afair i ported a fix and it should be upstreamed in 6.1. sfp2 (port5 of switch,lan4) was afair working so you could use this…just make sure it is not in lanbr

Seems vlan fix was not backported to 6.1

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/net/ethernet/mediatek/mtk_eth_soc.c?h=linux-6.6.y&id=c6d96df9fa2c1d19525239d4262889cce594ce6c

Using openwrt SNAPSHOT r25591-362f9c41a4 which is based on 6.1.82.

That’s too bad, my ISP also provides IPTV which also using vlan tagging therefore I have to bridge it with LAN port together in order to use IPTV. So it seems I have to stick with sfp1 at this moment. Thanks for your information.

You could try backport the patch yourself,seems i miss it into my tree too

Maybe disabling in hardware helps:

Just commenting it out

Have you tested it?

Felix’ patch has fixed tag for later commit where he made vlan offload configurable by ethtool, but the breaking code was there before.

Maybe we can send a patch fixing 6.1 too…just confirm disabling this line works.if not we have to dig further.

Sorry, I am not at home during workday, I will test it as soon as I get home. :sweat_smile:

Have you checked it on weekend?

@halry any new state?

Hi,

Regarding VLANs. VLANs work on SFP1 and SFP2. I have tested and the following works:

  1. No traffic on untagged. Commonly referred to as the P-VLAN, I set this to 99.
  2. VLAN 1 tagged (br-lan)
  3. VLAN 5 tagged. (br-guest)

When doing VLANs, I found that the BPI-R3 had problems if you tried to send/receive traffic on the untagged VLAN while also trying to send traffic on tagged vlans. I.e. VLAN 1 and 5 work, VLAN 99 fails to pass traffic.

Afair the problem is with vlan offloading because one mac is connected to switch (dsa tags for portmapping). So the traffic on the other mac without switch also strips vlan-tags…

Sfp-lan should not be affected on r3 as this is routed over mt7531 and gets dsa tags on top of vlan tag. Imho the issues is only on sfp-wan which is directly connected to mac

Have you tried disabling the line i pointed above (to disable vlan offloading)?

Sorry for the late reply, I was able to compile the firmware today(finally the labour day holiday :sweat_smile:) and have a preliminary test, it seems okay for this moment(at least the bridge and the wifi seems ok). I have aggregated all ports together and then use the bridge VLAN filter to divide the Guest VLAN and the home VLAN, then the WAN SFP port connects to the switch and the LAN 1 port connects to the next AP, it seems fine right now. Both can work under AP mode. Also seems your method can apply on other filogic routers that use both GMAC 0 and 1 for 2.5Gbps ports (in my case is XDR6088 and MT6000). Haven’t tested if the speed will compromise, but at least they work at this moment.

Thank you so much.

So vlan bug fixed so far? Good to know. Thx

Seems like that, I didn’t have it test thoroughly. Right now it just act as an AP and it works.

I was commented out the code as @frank-w mentioned and had the firmware compiled and right now in my case it works.(I haven’t check if some vlan tagged traffics leak to vlan untagged ones and vice versa which happened in a long time ago openwrt snapshot version)
vlan 1 untagged: home network
vlan 2 tagged: iot network
vlan 3 tagged: guest network

Would be great if you can some deeper tests as i currently hang on other things :stuck_out_tongue:

Have you done more tests here?