Subject: Re: [RFC net-next 7/7] net: dsa: mv88e6xxx: Request assisted learning on CPU port

From: Tobias Waldekranz <[email-masked]>
Date: Wed, 03 Feb 2021 11:42:10 +0100

On Wed, Feb 03, 2021 at 12:14, Vladimir Oltean <[email-masked]> wrote:
> On Wed, Feb 03, 2021 at 10:27:02AM +0100, Tobias Waldekranz wrote:
>> On Mon, Feb 01, 2021 at 14:24, DENG Qingfang <[email-masked]> wrote:
>> > I've tested your patch series on kernel 5.4 and found that it only works
>> > when VLAN filtering is enabled.
>> > After some debugging, I noticed DSA will add static entries to ATU 0 if
>> > VLAN filtering is disabled, regardless of default_pvid of the bridge,
>> > which is also the ATU# used by the bridge.
>> By default, a bridge will use a default PVID of 1, even when VLAN
>> filtering is disabled (nbp_vlan_init). Yet it will assign all packets to
>> VLAN 0 on ingress (br_handle_frame_finish->br_allowed_ingress).
>>
>> The switch OTOH, will use the PVID of the port for all packets when
>> 802.1Q is disabled, thus assigning all packets to VLAN 1 when VLAN
>> filtering is disabled.
>>
>> Andrew, Vladimir: Should mv88e6xxx always set the PVID to 0 when VLAN
>> filtering is disabled?
>
> For Ocelot/Felix, after trying to fight with some other fallout caused
> by a mismatch between hardware pvid and bridge pvid when vlan_filtering=0:
> https://patchwork.ozlabs.org/project/netdev/patch/[email-masked]/
> I did this and lived happily ever after:

OK great, so there is precedent. I will add it to my TODO.

Thank you!