Re: [PATCH net-next 0/5] PTP support for the SJA1105 DSA driver

From: Richard Cochran
Date: Fri May 31 2019 - 10:12:28 EST


On Fri, May 31, 2019 at 04:23:24PM +0300, Vladimir Oltean wrote:
> The switch has internal logic to not send any other frame to the CPU
> between a link-local and a meta frame.

So this is guarantied by the switch? What happens when multiple PTP
frames arrive at the same time on different ports? Does the switch
buffer them and ensure strict ordering at the CPU port?

In any case, the switch's guarantee is an important fact to state
clearly in your series!

> Hence, if the MAC of the DSA master drops some of these frames, it
> does not "spoil any chance" except if, out of the sequence LL n ->
> META n -> LL n+1 -> META n+1, it persistently drops only META n and LL
> n+1.

LL = link layer?

> So I'd like to re-state the problem towards what should be done to
> prevent LL and META frames getting reordered in the DSA master driver
> on multi-queue/multi-core systems.

Ok.

> At the most basic level, there
> should exist a rule that makes only a single core process these
> frames.

This can be done simply using a data structure in the driver with an
appropriate locking mechanism. Then you don't have to worry which
core the driver code runs on.

Thanks,
Richard