]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: lantiq: Add VLAN aware bridge offloading
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 5 May 2019 22:25:08 +0000 (00:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 May 2019 17:34:45 +0000 (10:34 -0700)
commit8a8d3136f1da103cff9f32151d2369ed4af44952
treece1026a3b5bd0265c508d1ab75ff3e8ea96e1b3f
parentfffa7127f191de1d9a66b4b1229a244d33b3c28d
net: dsa: lantiq: Add VLAN aware bridge offloading

The VLAN aware bridge offloading is similar to the VLAN unaware
offloading, this makes it possible to offload the VLAN bridge
functionalities.

The hardware supports up to 64 VLAN bridge entries, we already use one
entry for each LAN port to prevent forwarding of packets between the
ports when the ports are not in a bridge, so in the end we have 57
possible VLANs.

The VLAN filtering is currently only active when the ports are in a
bridge, VLAN filtering for ports not in a bridge is not implemented.

It is currently not possible to change between VLAN filtering and not
filtering while the port is already in a bridge, this would make the
driver more complicated.

The VLANs are only defined on bridge entries, so we will not add
anything into the hardware when the port joins a bridge if it is doing
VLAN filtering, but only when an allowed VLAN is added.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lantiq_gswip.c