Web lists-archives.com

Re: [PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0

On 5/31/19 11:19 AM, Vivien Didelot wrote:
> Hi Florian,
> On Fri, 31 May 2019 09:36:13 -0700, Florian Fainelli <f.fainelli@xxxxxxxxx> wrote:
>>> But VID 0 has a special meaning for the kernel, it means the port's private
>>> database (when it is isolated, non-bridged), it is not meant to be programmed
>>> in the switch. That's why I would've put that knowledge into the DSA layer,
>>> which job is to translate the kernel operations to the (dumb) DSA drivers.
>>> I hope I'm seeing things correctly here.
>> Your first part about the fact that it's the port private database is
>> true, the fact that it is not programmed into the HW actually depends on
>> what the switch is capable of doing. With mv88e6xxx you have per-port
>> VLAN filtering controls, but other switches that do not have that
>> capability need to program VID == 0 into the HW to continue maintaining
>> VLAN filtering on a non bridged port while a bridge has enslaved other
>> ports of the switch.
> Are you saying that switches without per-port VLAN filtering controls
> will program VID 0, and thus put all non bridged ports into the same VLAN,
> allowing them to talk to each other?

Because VLAN filtering is global to the switch, non-bridged ports must
have a default VLAN programmed, otherwise any untagged frame would
result in a VID volation. That default VLAN (0 for non-bridged) cannot
be the same as the bridge's default_pvid (typically 1) otherwise other
things like multicast would break (it gets checked differently than UC

There is an additional bitmask that controls whether ports can talk to
each other (at least with B53 switches).