net: dsa: tag_8021q: add support for imprecise RX based on the VBID
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 25 Feb 2022 09:22:17 +0000 (11:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Feb 2022 11:06:13 +0000 (11:06 +0000)
commitd7f9787a763f35225287aedb9364c972ae128d18
tree6d211d30a67aaff7b6b7c0d622d9147ff1e85e51
parent91495f21fcec3a889d6a9c21e6df16c4c15f2184
net: dsa: tag_8021q: add support for imprecise RX based on the VBID

The sja1105 switch can't populate the PORT field of the tag_8021q header
when sending a frame to the CPU with a non-zero VBID.

Similar to dsa_find_designated_bridge_port_by_vid() which performs
imprecise RX for VLAN-aware bridges, let's introduce a helper in
tag_8021q for performing imprecise RX based on the VLAN that it has
allocated for a VLAN-unaware bridge.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/dsa/8021q.h
net/dsa/tag_8021q.c
net/dsa/tag_ocelot_8021q.c
net/dsa/tag_sja1105.c