[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+h21hp9DfW3wFy4YbHMU31rBHyrnUTdF4kKwX36h9vHOW2COw@mail.gmail.com>
Date: Fri, 31 May 2019 16:23:24 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Richard Cochran <richardcochran@...il.com>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
John Stultz <john.stultz@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 0/5] PTP support for the SJA1105 DSA driver
On Fri, 31 May 2019 at 07:34, Richard Cochran <richardcochran@...il.com> wrote:
>
> On Thu, May 30, 2019 at 06:23:09PM +0300, Vladimir Oltean wrote:
> > On Thu, 30 May 2019 at 18:06, Richard Cochran <richardcochran@...il.com> wrote:
> > >
> > > But are the frames received in the same order? What happens your MAC
> > > drops a frame?
> > >
> >
> > If it drops a normal frame, it carries on.
> > If it drops a meta frame, it prints "Expected meta frame", resets the
> > state machine and carries on.
> > If it drops a timestampable frame, it prints "Unexpected meta frame",
> > resets the state machine and carries on.
>
> What I meant was, consider how dropped frames in the MAC will spoil
> any chance that the driver has to correctly match time stamps with
> frames.
>
> Thanks,
> Richard
I think you are still looking at this through the perspective of
sequence numbers.
I am *not* proposing to add sequence numbers for link-local and for
meta in software, and then try to match them, as that would lead to
complete chaos as you're suggesting.
The switch has internal logic to not send any other frame to the CPU
between a link-local and a meta frame.
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. If it drops less than 2 frames, the system recovers. And if it
drops more, oh well, there are more pressing issues to deal with..
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. At the most basic level, there
should exist a rule that makes only a single core process these
frames.
Regards,
-Vladimir
Powered by blists - more mailing lists