2023-07-03 23:07:02

by Vladimir Oltean

[permalink] [raw]
Subject: [PATCH v2 net 0/2] Fix mangled link-local MAC DAs with SJA1105 DSA

The SJA1105 hardware tagging protocol is weird and will put DSA
information (source port, switch ID) in the MAC DA of the packets sent
to the CPU, and then send some additional (meta) packets which contain
the original bytes from the previous packet's MAC DA.

The tagging protocol driver contains logic to handle this, but the meta
frames are optional functionality, and there are configurations when
they aren't received (no PTP RX timestamping). Thus, the MAC DA from
packets sent to the stack is not correct in all cases.

Also, during testing it was found that the MAC DA patching procedure was
incorrect.

The investigation comes as a result of this discussion with Paolo:
https://lore.kernel.org/netdev/[email protected]/

Vladimir Oltean (2):
net: dsa: tag_sja1105: fix MAC DA patching from meta frames
net: dsa: sja1105: always enable the send_meta options

drivers/net/dsa/sja1105/sja1105.h | 2 +-
drivers/net/dsa/sja1105/sja1105_main.c | 5 ++-
drivers/net/dsa/sja1105/sja1105_ptp.c | 48 +++----------------------
include/linux/dsa/sja1105.h | 4 ---
net/dsa/tag_sja1105.c | 49 ++------------------------
5 files changed, 9 insertions(+), 99 deletions(-)

--
2.34.1



2023-07-04 18:59:41

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH v2 net 0/2] Fix mangled link-local MAC DAs with SJA1105 DSA

Hello:

This series was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

On Tue, 4 Jul 2023 01:05:43 +0300 you wrote:
> The SJA1105 hardware tagging protocol is weird and will put DSA
> information (source port, switch ID) in the MAC DA of the packets sent
> to the CPU, and then send some additional (meta) packets which contain
> the original bytes from the previous packet's MAC DA.
>
> The tagging protocol driver contains logic to handle this, but the meta
> frames are optional functionality, and there are configurations when
> they aren't received (no PTP RX timestamping). Thus, the MAC DA from
> packets sent to the stack is not correct in all cases.
>
> [...]

Here is the summary with links:
- [v2,net,1/2] net: dsa: tag_sja1105: fix MAC DA patching from meta frames
https://git.kernel.org/netdev/net/c/1dcf6efd5f0c
- [v2,net,2/2] net: dsa: sja1105: always enable the send_meta options
https://git.kernel.org/netdev/net/c/a372d66af485

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html