On 3/14/14, 9:33 AM, "Miroslav Lichvar" <[email protected]> wrote:

>Does anyone know what is the typical accuracy we can expect in time
>stepping of a PHC via ADJ_SETOFFSET? I briefly looked in the kernel
>code and it seems most (all?) drivers implement it as a read and write
>to a register without any compensation for how long the operation
>takes, which causes a significant error.
>
>With an i210 I see:
>
>port 1: LISTENING to UNCALIBRATED on RS_SLAVE
>master offset        415 s0 freq  -22825 path delay       622
>master offset        423 s0 freq  -22825 path delay       622
>master offset        426 s0 freq  -22825 path delay       621
>master offset        427 s1 freq  -22820 path delay       621
>master offset      -5174 s2 freq  -27997 path delay       621
>port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
>master offset         10 s2 freq  -25399 path delay       620
>master offset       2729 s2 freq  -22674 path delay       493
>master offset       2764 s2 freq  -19982 path delay       328
>master offset        -59 s2 freq  -22719 path delay       328
>
>The initial 400ns offset is corrected by stepping, but it results in
>ten times larger offset and the servo needs more time to settle down
>from that error. I think we should increase the default first step
>threshold so it's used only when the offset is much larger than the
>stepping error, but I'm not sure what would be a good value for most
>PTP HW.
>
>-- 
>Miroslav Lichvar

Determining how long the PCIe read/write will take, for devices that
support time adjustment in HW and aren't using a timecounter, is tricky.
It depends on the state of the system at that point, so finding a constant
(or even rough approximation) for the delay would be problematic.

One thing we could look at is adding a write flush to the drivers after
writing their registers (for example, the SYSTIM registers on i210) to
force the writes through quicker, but on a quiet network I wouldn't expect
to see a massive improvement. Would you like me to get a patch together
for you to try out on i210 and see if it improves the initial jump?

Cheers,
Matthew

Matthew Vick
Linux Development
Networking Division
Intel Corporation


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to