On Fri, 31 May 2019 at 17:08, Richard Cochran <richardcoch...@gmail.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