lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 18 Apr 2023 12:27:59 +0300
From:   Arınç ÜNAL <arinc.unal@...nc9.com>
To:     Frank Wunderlich <linux@...web.de>, Felix Fietkau <nbd@....name>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Daniel Golle <daniel@...rotopia.org>
Cc:     John Crispin <john@...ozen.org>,
        Sean Wang <sean.wang@...iatek.com>,
        Mark Lee <Mark-MC.Lee@...iatek.com>,
        Lorenzo Bianconi <lorenzo@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org,
        Frank Wunderlich <frank-w@...lic-files.de>
Subject: Re: [RFC/RFT v1] net: ethernet: mtk_eth_soc: drop generic vlan rx
 offload, only use DSA untagging

On 16.04.2023 12:10, Frank Wunderlich wrote:
> From: Felix Fietkau <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@...nc9.com>

[0] https://github.com/arinc9/linux/commits/test-on-linuxnext

Arınç

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ