On Mon, Dec 13, 2021 at 02:31:47PM +0200, Vladimir Oltean wrote:
With other drivers, all packets injected from the CPU port act as if in
"god mode", bypassing any STP state. It then becomes the responsibility
of the software to not send packets on a port that is blocking,
except for packets for control protocols. Would you agree that ptp4l
should consider monitoring whether its ports are under a bridge, and
what STP state that bridge port is in?
Perhaps. linuxptp TC mode will forward frames out all configured
interfaces. If the bridge can't drop the PTP frames automatically,
then this could cause loops.
So if switch HW in general won't drop them, then, yes, the TC user
space stack will need to follow the STP state.
I think this isn't even specific
to DSA, the same thing would happen with software bridging:
(Linux doesn't support even SW time stamping on SW bridges, so you
can't have a TC running in this case.)
Thanks,
Richard