linux-stable/net/dsa
Vladimir Oltean e358bef7c3 net: dsa: Give drivers the chance to veto certain upper devices
Some switches rely on unique pvids to ensure port separation in
standalone mode, because they don't have a port forwarding matrix
configurable in hardware. So, setups like a group of 2 uppers with the
same VLAN, swp0.100 and swp1.100, will cause traffic tagged with VLAN
100 to be autonomously forwarded between these switch ports, in spite
of there being no bridge between swp0 and swp1.

These drivers need to prevent this from happening. They need to have
VLAN filtering enabled in standalone mode (so they'll drop frames tagged
with unknown VLANs) and they can only accept an 8021q upper on a port as
long as it isn't installed on any other port too. So give them the
chance to veto bad user requests.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
[Kurt: Pass info instead of ptr]
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-05 14:04:49 -08:00
..
dsa.c net: dsa: Add devlink port regions support to DSA 2020-10-04 14:38:53 -07:00
dsa2.c net: dsa: Register devlink ports before calling DSA driver setup() 2020-10-04 14:38:53 -07:00
dsa_priv.h net: dsa: Utilize __vlan_find_dev_deep_rcu() 2020-10-02 13:36:07 -07:00
Kconfig net: dsa: Add tag handling for Hirschmann Hellcreek switches 2020-11-05 14:04:49 -08:00
Makefile net: dsa: Add tag handling for Hirschmann Hellcreek switches 2020-11-05 14:04:49 -08:00
master.c net: dsa: allow drivers to request promiscuous mode on master 2020-09-26 14:17:58 -07:00
port.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
slave.c net: dsa: Give drivers the chance to veto certain upper devices 2020-11-05 14:04:49 -08:00
switch.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
tag_8021q.c net: dsa: tag_8021q: add VLANs to the master interface too 2020-09-20 19:01:34 -07:00
tag_ar9331.c net: dsa: tag_ar9331: let DSA core deal with TX reallocation 2020-11-02 17:41:17 -08:00
tag_brcm.c net: dsa: tag_brcm: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_dsa.c net: dsa: tag_dsa: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_edsa.c net: dsa: tag_edsa: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_gswip.c net: dsa: tag_gswip: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_hellcreek.c net: dsa: Add tag handling for Hirschmann Hellcreek switches 2020-11-05 14:04:49 -08:00
tag_ksz.c net: dsa: tag_ksz: don't allocate additional memory for padding/tagging 2020-11-02 17:41:16 -08:00
tag_lan9303.c net: dsa: tag_lan9303: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_mtk.c net: dsa: tag_mtk: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_ocelot.c net: dsa: tag_ocelot: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_qca.c net: dsa: tag_qca: let DSA core deal with TX reallocation 2020-11-02 17:41:16 -08:00
tag_rtl4_a.c net: dsa: tag_rtl4_a: use the generic flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_sja1105.c net: dsa: tag_sja1105: use a custom flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_trailer.c net: dsa: trailer: don't allocate additional memory for padding/tagging 2020-11-02 17:41:16 -08:00