[RFC/RFT v1] net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging
Arınç ÜNAL
arinc.unal at arinc9.com
Tue Apr 18 02:27:59 PDT 2023
On 16.04.2023 12:10, Frank Wunderlich wrote:
> From: Felix Fietkau <nbd at nbd.name>
>
> Through testing I found out that hardware vlan rx offload support seems to
> have some hardware issues. At least when using multiple MACs and when receiving
> tagged packets on the secondary MAC, the hardware can sometimes start to emit
> wrong tags on the first MAC as well.
>
> In order to avoid such issues, drop the feature configuration and use the
> offload feature only for DSA hardware untagging on MT7621/MT7622 devices which
> only use one MAC.
I would change this part to:
In order to avoid such issues, drop the feature configuration and use
the offload feature only for DSA hardware untagging on MT7621/MT7622
devices where this feature works properly.
I tried this on linux-next with my defconfig and devicetree [0], on a
MikroTik RouterBOARD 760iGS. I tried both VLAN configurations possible,
VLAN subinterface of the eth1 interface, and bridge VLAN filtering on a
bridge with eth1 joined. In both cases, both sides receive VLAN tagged
frames whether this patch is applied or not.
My computer is plugged to the RJ45 SFP module which is connected to the
Qualcomm Atheros AR8031/AR8033 PHY which is connected to MT7621's gmac1.
My computer:
sudo ip l add link enp9s0 name enp9s0.10 type vlan id 10
sudo ip a add 192.168.3.2/24 dev enp9s0.10
sudo ip l set up enp9s0
MT7621 VLAN subinterface test:
ip l add l eth1 name eth1.10 type vlan id 10
ip a add 192.168.3.1/24 dev eth1.10
ip l set up eth1
ip l set up eth1.10
ping 192.168.3.2
MT7621 bridge VLAN filtering test:
ip l del eth1.10
ip l add br0 type bridge vlan_filtering 1
ip l set eth1 master br0
bridge v add vid 10 dev eth1
bridge v add vid 10 dev br0 self
ip l add l br0 name br0.10 type vlan id 10
ip a add 192.168.3.1/24 dev br0.10
ip l set up br0
ip l set up br0.10
ping 192.168.3.2
In conclusion, it's not that VLAN RX offloading is being kept enabled
for MT7621 because it uses only one MAC. It's because it just works. I
am assuming this is the same case for MT7622.
With that:
Tested-by: Arınç ÜNAL <arinc.unal at arinc9.com>
[0] https://github.com/arinc9/linux/commits/test-on-linuxnext
Arınç
More information about the Linux-mediatek
mailing list