WSL2-Linux-Kernel/net/dsa
Vladimir Oltean e9ffc19513 net: dsa: tag_sja1105: always prefer source port information from INCL_SRCPT
commit c1ae02d876 upstream.

Currently the sja1105 tagging protocol prefers using the source port
information from the VLAN header if that is available, falling back to
the INCL_SRCPT option if it isn't. The VLAN header is available for all
frames except for META frames initiated by the switch (containing RX
timestamps), and thus, the "if (is_link_local)" branch is practically
dead.

The tag_8021q source port identification has become more loose
("imprecise") and will report a plausible rather than exact bridge port,
when under a bridge (be it VLAN-aware or VLAN-unaware). But link-local
traffic always needs to know the precise source port. With incorrect
source port reporting, for example PTP traffic over 2 bridged ports will
all be seen on sockets opened on the first such port, which is incorrect.

Now that the tagging protocol has been changed to make link-local frames
always contain source port information, we can reverse the order of the
checks so that we always give precedence to that information (which is
always precise) in lieu of the tag_8021q VID which is only precise for a
standalone port.

Fixes: d7f9787a76 ("net: dsa: tag_8021q: add support for imprecise RX based on the VBID")
Fixes: 91495f21fc ("net: dsa: tag_8021q: replace the SVL bridging with VLAN-unaware IVL bridging")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ Replaced the 2 original Fixes: tags with the correct one.
  Respun the change around the lack of a "vbid", corresponding to DSA
  FDB isolation, which appeared only in v5.18. ]
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:39:54 +02:00
..
Kconfig
Makefile
dsa.c Revert "net: dsa: mv88e6xxx: flush switchdev FDB workqueue before removing VLAN" 2022-03-16 14:23:47 +01:00
dsa2.c net: dsa: introduce preferred_default_local_cpu_port and use on MT7530 2024-04-27 17:05:29 +02:00
dsa_priv.h net: dsa: make dsa_master_ioctl() see through port_hwtstamp_get() shims 2022-11-26 09:24:40 +01:00
master.c net: dsa: make dsa_master_ioctl() see through port_hwtstamp_get() shims 2022-11-26 09:24:40 +01:00
port.c net: dsa: make dsa_master_ioctl() see through port_hwtstamp_get() shims 2022-11-26 09:24:40 +01:00
slave.c net: use eth_hw_addr_set() instead of ether_addr_copy() 2022-08-31 17:16:37 +02:00
switch.c
tag_8021q.c net: dsa: tag_8021q: avoid leaking ctx on dsa_tag_8021q_register() error path 2022-12-31 13:14:21 +01:00
tag_ar9331.c
tag_brcm.c net: dsa: tag_brcm: legacy: fix daisy-chained switches 2023-03-30 12:47:48 +02:00
tag_dsa.c
tag_gswip.c
tag_hellcreek.c net: dsa: hellcreek: Check return value 2022-12-14 11:37:25 +01:00
tag_ksz.c net: dsa: ksz: Check return value 2022-12-14 11:37:24 +01:00
tag_lan9303.c
tag_mtk.c
tag_ocelot.c
tag_ocelot_8021q.c
tag_qca.c
tag_rtl4_a.c
tag_sja1105.c net: dsa: tag_sja1105: always prefer source port information from INCL_SRCPT 2024-06-16 13:39:54 +02:00
tag_trailer.c
tag_xrs700x.c