linux/drivers/net/dsa/sja1105
Vladimir Oltean a1e6f641e3 Revert "net: dsa: sja1105: Clear VLAN filtering offload netdev feature"
This reverts commit e9bf96943b.

The topic of the reverted patch is the support for switches with global
VLAN filtering, added by commit 061f6a505a ("net: dsa: Add
ndo_vlan_rx_{add, kill}_vid implementation"). Be there a switch with 4
ports swp0 -> swp3, and the following setup:

ip link add br0 type bridge vlan_filtering 1
ip link set swp0 master br0
ip link set swp1 master br0

What would happen with VLAN-tagged traffic received on standalone ports
swp2 and swp3? Well, it would get dropped, were it not for the
.ndo_vlan_rx_add_vid and .ndo_vlan_rx_kill_vid implementations (called
from vlan_vid_add and vlan_vid_del respectively). Basically, for DSA
switches where VLAN filtering is a global attribute, we enforce the
standalone ports to have 'rx-vlan-filter: off [fixed]' in their ethtool
features, which lets the user know that all VLAN-tagged packets that are
not explicitly added in the RX filtering list are dropped.

As for the sja1105 driver, at the time of the reverted patch, it was
operating in a pretty handicapped mode when it had ports under a bridge
with vlan_filtering=1. Specifically, it was unable to terminate traffic
through the CPU port (for further explanation see "Traffic support" in
Documentation/networking/dsa/sja1105.rst).

However, since then, the sja1105 driver has made considerable progress,
and that limitation is no longer as severe now. Specifically, since
commit 2cafa72e51 ("net: dsa: sja1105: add a new
best_effort_vlan_filtering devlink parameter"), the driver is able to
perform CPU termination even when some ports are under bridges with
vlan_filtering=1. Then, since commit 8841f6e63f ("net: dsa: sja1105:
make devlink property best_effort_vlan_filtering true by default"), this
even became the default operating mode.

So we can now take advantage of the logic in the DSA core.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-20 19:17:05 -07:00
..
Kconfig net: dsa: sja1105: support flow-based redirection via virtual links 2020-05-07 17:31:57 -07:00
Makefile net: dsa: sja1105: move devlink param code to sja1105_devlink.c 2020-09-25 16:35:27 -07:00
sja1105.h net: dsa: sja1105: fix leakage of flooded frames outside bridging domain 2021-02-16 14:02:46 -08:00
sja1105_clocking.c net: dsa: sja1105: enable internal pull-down for RX_DV/CRS_DV/RX_CTL and RX_ER 2020-04-20 11:00:27 -07:00
sja1105_devlink.c net: dsa: propagate extack to .port_vlan_filtering 2021-02-14 17:38:12 -08:00
sja1105_dynamic_config.c net: dsa: sja1105: remove duplicate prefix for VL Lookup dynamic config 2020-10-03 17:34:42 -07:00
sja1105_dynamic_config.h net: dsa: sja1105: make config table operation structures constant 2020-06-22 16:01:29 -07:00
sja1105_ethtool.c dsa: sja1105: fix semicolon.cocci warnings 2020-05-10 11:05:46 -07:00
sja1105_flower.c net: dsa: sja1105: fix error return code in sja1105_cls_flower_add() 2021-03-16 11:14:59 -07:00
sja1105_main.c Revert "net: dsa: sja1105: Clear VLAN filtering offload netdev feature" 2021-03-20 19:17:05 -07:00
sja1105_ptp.c net: dsa: sja1105: poll for extts events from a timer 2020-08-03 18:16:02 -07:00
sja1105_ptp.h net: dsa: sja1105: poll for extts events from a timer 2020-08-03 18:16:02 -07:00
sja1105_sgmii.h net: dsa: sja1105: Add support for the SGMII port 2020-03-20 08:55:21 -07:00
sja1105_spi.c net: dsa: sja1105: offload bridge port flags to device 2021-02-12 17:08:05 -08:00
sja1105_static_config.c net: dsa: sja1105: Remove unneeded cast in sja1105_crc32() 2021-02-25 09:41:32 -08:00
sja1105_static_config.h net: dsa: sja1105: make config table operation structures constant 2020-06-22 16:01:29 -07:00
sja1105_tas.c net: dsa: sja1105: Use struct_size() in kzalloc() 2020-06-19 13:42:08 -07:00
sja1105_tas.h net: dsa: sja1105: implement tc-gate using time-triggered virtual links 2020-05-07 17:31:57 -07:00
sja1105_vl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-06-25 19:29:51 -07:00
sja1105_vl.h net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c 2020-06-01 12:13:47 -07:00