summaryrefslogtreecommitdiff
path: root/include/linux/dsa
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-01-29 02:59:59 +0200
committerJakub Kicinski <kuba@kernel.org>2021-01-29 21:24:30 -0800
commit9c7caf28068421c9e0d1faea437e35e6b8983ac6 (patch)
treeac93a87dd38ad05dd4348ed454828cd7939831a4 /include/linux/dsa
parentde1da8bcf40564a2adada2d5d5426e05355f66e8 (diff)
downloadlwn-9c7caf28068421c9e0d1faea437e35e6b8983ac6.tar.gz
lwn-9c7caf28068421c9e0d1faea437e35e6b8983ac6.zip
net: dsa: tag_8021q: add helpers to deduce whether a VLAN ID is RX or TX VLAN
The sja1105 implementation can be blind about this, but the felix driver doesn't do exactly what it's being told, so it needs to know whether it is a TX or an RX VLAN, so it can install the appropriate type of TCAM rule. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/dsa')
-rw-r--r--include/linux/dsa/8021q.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/dsa/8021q.h b/include/linux/dsa/8021q.h
index 88cd72dfa4e0..b12b05f1c8b4 100644
--- a/include/linux/dsa/8021q.h
+++ b/include/linux/dsa/8021q.h
@@ -64,6 +64,10 @@ int dsa_8021q_rx_source_port(u16 vid);
u16 dsa_8021q_rx_subvlan(u16 vid);
+bool vid_is_dsa_8021q_rxvlan(u16 vid);
+
+bool vid_is_dsa_8021q_txvlan(u16 vid);
+
bool vid_is_dsa_8021q(u16 vid);
#else
@@ -123,6 +127,16 @@ u16 dsa_8021q_rx_subvlan(u16 vid)
return 0;
}
+bool vid_is_dsa_8021q_rxvlan(u16 vid)
+{
+ return false;
+}
+
+bool vid_is_dsa_8021q_txvlan(u16 vid)
+{
+ return false;
+}
+
bool vid_is_dsa_8021q(u16 vid)
{
return false;