Re: [PATCH v4 net-next 10/10] net: dsa: microchip: add support for vlan operations

From: Vladimir Oltean
Date: Thu Oct 14 2021 - 10:20:15 EST


On Mon, Oct 11, 2021 at 11:13:36PM +0530, Prasanna Vengateshan wrote:
> > Do you have an explanation for what SW_VLAN_ENABLE does exactly?
> Enabling the VLAN mode and then act as per the VLAN table.
> Do you want me to add this explanation as a comment? or?

Yes, not all switches have the same knobs, it would be good to have a
comment about what you are changing.

> Step (0)
> > ip link add br0 type bridge vlan_filtering 1
> > ip link set lan0 master br0
> > bridge vlan add dev lan0 vid 100 pvid untagged
> Step (1)
> > bridge vlan del dev lan0 vid 100
> Step (2)
> > ip link set br0 type bridge vlan_filtering 0
> >
> > The expectation is that the switch, being VLAN-unaware as it is currently
> > configured, receives and sends any packet regardless of VLAN ID.
> > If you put an IP on br0 in this state, are you able to ping an outside host?
>
> I have numbered the commands above.
> Results are,
> Before Step (0). Am able to ping outside.
> After Step (0). Am not able to ping outside because the vlan table is set
> After Step (1). Am not able to ping outside
> After Step (2). Am able to ping outside because of vlan unaware mode.

This sounds okay.