[lkml]   [2019]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH net-next 0/5] PTP support for the SJA1105 DSA driver
On Sat, 1 Jun 2019 at 08:07, Richard Cochran <> wrote:
> On Fri, May 31, 2019 at 09:12:03PM +0300, Vladimir Oltean wrote:
> > It won't work unless I make changes to dsa_switch_rcv.
> Or to the tagging code.
> > Right now taggers can only return a pointer to the skb, or NULL, case
> > in which DSA will free it.
> The tagger can re-write the skb. Why not reform it into a PTP frame?
> This clever trick is what the phyter does in hardware. See dp83640.c.

I think you're missing the point here.
If I dress the meta frame into a PTP frame (btw is there any
preferable event message for this purpose?) then sure, I'll make
dsa_skb_defer_rx_timestamp call my .port_rxtstamp and I can e.g. move
my state machine there.
The problem is that in the current DSA structure, I'll still have less
timestampable frames waiting for a meta frame than meta frames
themselves. This is because not all frames that the switch takes an RX
timestamp for will make it to my .port_rxtstamp (in fact that is what
my .can_timestamp patch changes). I can put the timestampable frame in
a 1-entry wait queue which I'll deplete upon arrival of the first meta
frame, but when I get meta frames and the wait queue is empty, it can
mean multiple things: either DSA didn't care about this timestamp
(ok), or the timestampable frame got reordered or dropped by the MAC,
or what have you (not ok). So I can't exclude the possibility that the
meta frame was holding a relevant timestamp.
Sure, I can dress the meta frame into whatever the previous
MAC-trapped frame was (PTP or not) and then I'll have .port_rxtstamp
function see a 1-to-1 correspondence with meta frames in case
everything works fine. But then I'll have non-PTP meta frames leaking
up the stack...


> Thanks,
> Richard

 \ /
  Last update: 2019-06-01 12:32    [W:0.106 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site