[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+h21hroywaij3gyO0u6v+GFVO2Fv_dP_a+L3oMGpQH8mQgJ5g@mail.gmail.com>
Date: Fri, 31 May 2019 17:27:15 +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 17:08, Richard Cochran <richardcochran@...il.com> wrote:
>
> 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!
>
Yes, ports with lower index take priority.
> > 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?
>
Yes, link-local in this case means trapped frames in the
01-80-C2-xx-xx-xx or 01:1B:C9:xx:xx:xx space.
> > 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.
>
Actually you do. DSA is special because it is not the first net device
in the RX path that processes the frames. Something needs to be done
on the master port.
> Thanks,
> Richard
Powered by blists - more mailing lists