linux/include/soc
Vladimir Oltean 36dd1141be net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged
I was revisiting the topic of 802.1ad treatment in the Ocelot switch [0]
and realized that not only is its basic VLAN classification pipeline
improper for offloading vlan_protocol 802.1ad bridges, but also improper
for offloading regular 802.1Q bridges already.

Namely, 802.1ad-tagged traffic should be treated as VLAN-untagged by
bridged ports, but this switch treats it as if it was 802.1Q-tagged with
the same VID as in the 802.1ad header. This is markedly different to
what the Linux bridge expects; see the "other_tpid()" function in
tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh.

An idea came to me that the VCAP IS1 TCAM is more powerful than I'm
giving it credit for, and that it actually overwrites the classified VID
before the VLAN Table lookup takes place. In other words, it can be
used even to save a packet from being dropped on ingress due to VLAN
membership.

Add a sophisticated TCAM rule hardcoded into the driver to force the
switch to behave like a Linux bridge with vlan_filtering 1 vlan_protocol
802.1Q.

Regarding the lifetime of the filter: eventually the bridge will
disappear, and vlan_filtering on the port will be restored to 0 for
standalone mode. Then the filter will be deleted.

[0]: https://lore.kernel.org/netdev/20201009122947.nvhye4hvcha3tljh@skbuf/

Fixes: 7142529f16 ("net: mscc: ocelot: add VLAN filtering")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-08-16 09:59:32 +01:00
..
amlogic perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver 2022-11-21 18:28:45 +00:00
arc clocksource/drivers/arc_timer: Eliminate redefined macro error 2021-10-16 22:15:01 +02:00
at91 ARM: at91: Remove unused extern declarations 2023-07-29 16:56:09 +03:00
bcm2835 firmware: raspberrypi: Fix type assignment 2023-01-10 13:44:04 -08:00
canaan
fsl soc: fsl: cpm1: qmc: Introduce qmc_chan_count_phandles() 2024-07-04 12:24:59 +01:00
imx clk: imx25: print silicon revision during init 2023-08-14 12:41:05 +03:00
mediatek iommu/mediatek: Add enable IOMMU SMC command for INFRA masters 2023-08-07 14:15:48 +02:00
microchip clk, reset: microchip: mpfs: fix incorrect preprocessor conditions 2024-05-08 18:38:12 -07:00
mscc net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged 2024-08-16 09:59:32 +01:00
qcom soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request 2024-04-21 12:11:40 -05:00
rockchip PM / devfreq: rockchip-dfi: add support for RK3588 2023-10-19 21:21:16 +09:00
sa1100
sifive soc: sifive: ccache: Rename SiFive L2 cache to Composable cache. 2022-10-13 11:06:51 -07:00
starfive clk: starfive: Avoid casting iomem pointers 2023-04-13 15:45:46 -07:00
tegra Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00