2023-04-26 17:32:40

by Arınç ÜNAL

[permalink] [raw]
Subject: Re: [net v2] net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging

On 26/04/2023 20:21, Frank Wunderlich wrote:
> From: Felix Fietkau <[email protected]>
>
> 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 where this feature works properly.
>
> Fixes: 08666cbb7dd5 ("net: ethernet: mtk_eth_soc: add support for configuring vlan rx offload")
> Tested-by: Frank Wunderlich <[email protected]>
> Signed-off-by: Felix Fietkau <[email protected]>
> Signed-off-by: Frank Wunderlich <[email protected]>
> Tested-by: Arınç ÜNAL <[email protected]>
> ---
> v2:
> - changed commit message to drop "only one MAC used" phrase based on
> Arincs comments
> - fixed too long line in commit description and add empty line after
> declaration
> - add fixes tag
>
> used felix Patch as base and ported up to 6.3-rc6
>
> it basicly reverts changes from vladimirs patch
>
> 1a3245fe0cf8 net: ethernet: mtk_eth_soc: fix DSA TX tag hwaccel for switch port 0
>
> tested this on bananapi-r3 on non-dsa gmac1 and dsa eth0 (wan).
> on both vlan is working, but maybe it breaks HW-vlan-untagging

I'm confused by this. What is HW-vlan-untagging, and which SoCs do you
think this patch would break this feature? How can I utilise this
feature on Linux so I can confirm whether it works or not?

Arınç


2023-04-26 17:38:52

by Frank Wunderlich

[permalink] [raw]
Subject: Aw: Re: [net v2] net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging


> Gesendet: Mittwoch, 26. April 2023 um 19:25 Uhr
> Von: "Arınç ÜNAL" <[email protected]>
> On 26/04/2023 20:21, Frank Wunderlich wrote:
> > From: Felix Fietkau <[email protected]>
> >
> > 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 where this feature works properly.
> >
> > Fixes: 08666cbb7dd5 ("net: ethernet: mtk_eth_soc: add support for configuring vlan rx offload")
> > Tested-by: Frank Wunderlich <[email protected]>
> > Signed-off-by: Felix Fietkau <[email protected]>
> > Signed-off-by: Frank Wunderlich <[email protected]>
> > Tested-by: Arınç ÜNAL <[email protected]>
>
> I'm confused by this. What is HW-vlan-untagging, and which SoCs do you
> think this patch would break this feature? How can I utilise this
> feature on Linux so I can confirm whether it works or not?

the feature itself breaks vlan on mac of bpi-r3

1 mac is connected to switch and uses dsa tags, the other mac is directly accessible and vlan-tag
there is stripped by this feature.

with this patch i can use vlans on the "standalone" mac again (see tagged packets incoming).

regards Frank

2023-04-26 18:00:10

by Arınç ÜNAL

[permalink] [raw]
Subject: Re: Aw: Re: [net v2] net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging

On 26/04/2023 20:31, Frank Wunderlich wrote:
>
>> Gesendet: Mittwoch, 26. April 2023 um 19:25 Uhr
>> Von: "Arınç ÜNAL" <[email protected]>
>> On 26/04/2023 20:21, Frank Wunderlich wrote:
>>> From: Felix Fietkau <[email protected]>
>>>
>>> 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 where this feature works properly.
>>>
>>> Fixes: 08666cbb7dd5 ("net: ethernet: mtk_eth_soc: add support for configuring vlan rx offload")
>>> Tested-by: Frank Wunderlich <[email protected]>
>>> Signed-off-by: Felix Fietkau <[email protected]>
>>> Signed-off-by: Frank Wunderlich <[email protected]>
>>> Tested-by: Arınç ÜNAL <[email protected]>
>>
>> I'm confused by this. What is HW-vlan-untagging, and which SoCs do you
>> think this patch would break this feature? How can I utilise this
>> feature on Linux so I can confirm whether it works or not?
>
> the feature itself breaks vlan on mac of bpi-r3
>
> 1 mac is connected to switch and uses dsa tags, the other mac is directly accessible and vlan-tag
> there is stripped by this feature.
>
> with this patch i can use vlans on the "standalone" mac again (see tagged packets incoming).

Ok, since this patch is disabling the feature, the patch cannot possibly
break the feature. That's why I was confused as to why you mentioned
this in a way that gives the impression that this patch may break the
said feature.

Anyhow:

Acked-by: Arınç ÜNAL <[email protected]>

Arınç

2023-04-26 18:09:54

by Frank Wunderlich

[permalink] [raw]
Subject: Aw: Re: [net v2] net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging

Hi
> Gesendet: Mittwoch, 26. April 2023 um 19:25 Uhr
> Von: "Arınç ÜNAL" <[email protected]>

> > tested this on bananapi-r3 on non-dsa gmac1 and dsa eth0 (wan).
> > on both vlan is working, but maybe it breaks HW-vlan-untagging
>
> I'm confused by this. What is HW-vlan-untagging, and which SoCs do you
> think this patch would break this feature? How can I utilise this
> feature on Linux so I can confirm whether it works or not?

oh, you mean my wording about "hw-vlan-untagging"...i mean the hw vlan offload feature which may
not be working on non-mt7621/7622 devices as i have no idea how to check this. i hope felix can
answer this. at least the feature activeated on mt7986 breaks sw-vlan on the gmac1 (without
switch).

regards Frank

2023-04-26 18:11:45

by Arınç ÜNAL

[permalink] [raw]
Subject: Re: Aw: Re: [net v2] net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging

On 26/04/2023 20:52, Frank Wunderlich wrote:
> Hi
>> Gesendet: Mittwoch, 26. April 2023 um 19:25 Uhr
>> Von: "Arınç ÜNAL" <[email protected]>
>
>>> tested this on bananapi-r3 on non-dsa gmac1 and dsa eth0 (wan).
>>> on both vlan is working, but maybe it breaks HW-vlan-untagging
>>
>> I'm confused by this. What is HW-vlan-untagging, and which SoCs do you
>> think this patch would break this feature? How can I utilise this
>> feature on Linux so I can confirm whether it works or not?
>
> oh, you mean my wording about "hw-vlan-untagging"...i mean the hw vlan offload feature which may
> not be working on non-mt7621/7622 devices as i have no idea how to check this. i hope felix can
> answer this. at least the feature activeated on mt7986 breaks sw-vlan on the gmac1 (without
> switch).

The "hw vlan offload" feature being broken on non-mt7621/7622 devices is
already established, hence this patch disabling it for the
non-mt7621/7622 devices. I still don't understand why you're mentioning
it in this way, unless you're trying to say something else?

Could you also not trim the relevant parts of the mail on your response.
It's getting hard to keep track of the conversation.

Arınç