linux/net/dsa
Vladimir Oltean dcfe767378 net: dsa: tag_sja1105: absorb logic for not overwriting precise info into dsa_8021q_rcv()
In both sja1105_rcv() and sja1110_rcv(), we may have precise source port
information coming from parallel hardware mechanisms, in addition to the
tag_8021q header.

Only sja1105_rcv() has extra logic to not overwrite that precise info
with what's present in the VLAN tag. This is because sja1110_rcv() gets
by, by having a reversed set of checks when assigning skb->dev. When the
source port is imprecise (vbid >=1), source_port and switch_id will be
set to zeroes by dsa_8021q_rcv(), which might be problematic. But by
checking for vbid >= 1 first, sja1110_rcv() fends that off.

We would like to make more code common between sja1105_rcv() and
sja1110_rcv(), and for that, we need to make sure that sja1110_rcv()
also goes through the precise source port preservation logic.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Tested-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20240713211620.1125910-4-paweldembicki@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-07-15 06:55:15 -07:00
..
conduit.c net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
conduit.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
devlink.c devlink: extend devlink_param *set pointer 2024-04-22 13:05:19 -07:00
devlink.h net: dsa: move rest of devlink setup/teardown to devlink.c 2022-11-22 20:41:47 -08:00
dsa.c net: dsa: remove mac_prepare()/mac_finish() shims 2024-05-29 18:41:15 -07:00
dsa.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
Kconfig net: dsa: Fix typo in NET_DSA_TAG_RTL4_A Kconfig 2024-06-11 19:24:11 -07:00
Makefile net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
netlink.c net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT 2023-10-24 13:08:14 -07:00
netlink.h net: dsa: kill off dsa_priv.h 2022-11-22 20:41:54 -08:00
port.c net: dsa: update the unicast MAC address when changing conduit 2024-06-10 13:48:06 +01:00
port.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
stubs.c net: dsa: replace NETDEV_PRE_CHANGE_HWTSTAMP notifier with a stub 2023-04-09 15:35:49 +01:00
switch.c net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
switch.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
tag_8021q.c net: dsa: tag_sja1105: absorb logic for not overwriting precise info into dsa_8021q_rcv() 2024-07-15 06:55:15 -07:00
tag_8021q.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
tag_ar9331.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_brcm.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_dsa.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_gswip.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_hellcreek.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_ksz.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_lan9303.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_mtk.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_none.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_ocelot_8021q.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_ocelot.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_qca.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_rtl4_a.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_rtl8_4.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_rzn1_a5psw.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_sja1105.c net: dsa: tag_sja1105: absorb logic for not overwriting precise info into dsa_8021q_rcv() 2024-07-15 06:55:15 -07:00
tag_trailer.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag_xrs700x.c net: fill in MODULE_DESCRIPTION()s for DSA tags 2024-01-05 08:06:19 -08:00
tag.c net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
tag.h net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
trace.c net: dsa: add trace points for FDB/MDB operations 2023-04-12 08:36:07 +01:00
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
user.c net: dsa: update the unicast MAC address when changing conduit 2024-06-10 13:48:06 +01:00
user.h net: dsa: update the unicast MAC address when changing conduit 2024-06-10 13:48:06 +01:00