linux-stable/net/dsa
Vladimir Oltean 947d741adf net: dsa: sja1105: always enable the send_meta options
[ Upstream commit a372d66af4 ]

incl_srcpt has the limitation, mentioned in commit b4638af888 ("net:
dsa: sja1105: always enable the INCL_SRCPT option"), that frames with a
MAC DA of 01:80:c2:xx:yy:zz will be received as 01:80:c2:00:00:zz unless
PTP RX timestamping is enabled.

The incl_srcpt option was initially unconditionally enabled, then that
changed with commit 42824463d3 ("net: dsa: sja1105: Limit use of
incl_srcpt to bridge+vlan mode"), then again with b4638af888 ("net:
dsa: sja1105: always enable the INCL_SRCPT option"). Bottom line is that
it now needs to be always enabled, otherwise the driver does not have a
reliable source of information regarding source_port and switch_id for
link-local traffic (tag_8021q VLANs may be imprecise since now they
identify an entire bridging domain when ports are not standalone).

If we accept that PTP RX timestamping (and therefore, meta frame
generation) is always enabled in hardware, then that limitation could be
avoided and packets with any MAC DA can be properly received, because
meta frames do contain the original bytes from the MAC DA of their
associated link-local packet.

This change enables meta frame generation unconditionally, which also
has the nice side effects of simplifying the switch control path
(a switch reset is no longer required on hwtstamping settings change)
and the tagger data path (it no longer needs to be informed whether to
expect meta frames or not - it always does).

Fixes: 227d07a07e ("net: dsa: sja1105: Add support for traffic through standalone ports")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:22:06 +02:00
..
Kconfig net: dsa: tag_ksz: add tag handling for Microchip LAN937x 2022-07-02 16:34:05 +01:00
Makefile net: dsa: allow the DSA master to be seen and changed through rtnetlink 2022-09-20 10:32:35 +02:00
dsa.c net: dsa: allow the DSA master to be seen and changed through rtnetlink 2022-09-20 10:32:35 +02:00
dsa2.c net: dsa: don't leak tagger-owned storage on switch driver unbind 2022-11-15 20:50:52 -08:00
dsa_priv.h net: dsa: make dsa_master_ioctl() see through port_hwtstamp_get() shims 2022-11-14 11:30:49 +00:00
master.c net: dsa: make dsa_master_ioctl() see through port_hwtstamp_get() shims 2022-11-14 11:30:49 +00:00
netlink.c net: dsa: make user ports return to init_net on netns deletion 2022-09-26 11:28:57 -07:00
port.c net: dsa: make dsa_master_ioctl() see through port_hwtstamp_get() shims 2022-11-14 11:30:49 +00:00
slave.c net: dsa: don't error out when drivers return ETH_DATA_LEN in .port_max_mtu() 2023-03-22 13:33:49 +01:00
switch.c net: dsa: allow masters to join a LAG 2022-09-20 10:32:36 +02:00
tag_8021q.c net: dsa: tag_8021q: avoid leaking ctx on dsa_tag_8021q_register() error path 2022-12-31 13:32:29 +01:00
tag_ar9331.c
tag_brcm.c net: dsa: tag_brcm: legacy: fix daisy-chained switches 2023-03-30 12:49:09 +02:00
tag_dsa.c net: dsa: tag_dsa: Fix tx from VLAN uppers on non-filtering bridges 2022-03-08 11:12:28 +01:00
tag_gswip.c
tag_hellcreek.c net: dsa: hellcreek: Check return value 2022-12-02 20:46:52 -08:00
tag_ksz.c net: dsa: ksz: Check return value 2022-12-02 20:46:51 -08:00
tag_lan9303.c
tag_mtk.c
tag_ocelot.c
tag_ocelot_8021q.c net: dsa: tag_8021q: merge RX and TX VLANs 2022-02-27 11:06:14 +00:00
tag_qca.c
tag_rtl4_a.c
tag_rtl8_4.c net: dsa: tag_rtl8_4: fix typo in modalias name 2022-03-09 20:36:24 -08:00
tag_rzn1_a5psw.c net: dsa: add Renesas RZ/N1 switch tag driver 2022-06-27 11:37:55 +01:00
tag_sja1105.c net: dsa: sja1105: always enable the send_meta options 2023-07-19 16:22:06 +02:00
tag_trailer.c
tag_xrs700x.c