]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: felix: accept VLAN config regardless of bridge VLAN awareness state
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 27 May 2020 16:45:38 +0000 (19:45 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 18:39:58 +0000 (11:39 -0700)
commitb4a396ec1191a0743f51852fea956ae7e8d28066
tree08dd191653fa9a67a8ca649822ce081ee6cf76ba
parentf4001117f81a84647488dd801eba2de8c3e05aad
net: dsa: felix: accept VLAN config regardless of bridge VLAN awareness state

The ocelot core library is written with the idea in mind that the VLAN
table is populated by the bridge. Otherwise, not even a sane default
pvid is provided: in standalone mode, the default pvid is 0, and the
core expects the bridge layer to change it to 1.

So without this patch, the VLAN table is completely empty at the end of
the commands below, and traffic is broken as a result:

ip link add dev br0 type bridge vlan_filtering 0 && ip link set dev br0 up
for eth in $(ls /sys/bus/pci/devices/0000\:00\:00.5/net/); do
ip link set dev $eth master br0
ip link set dev $eth up
done
ip link set dev br0 type bridge vlan_filtering 1

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix.c