On 3/19/14, 3:19 AM, "Miroslav Lichvar" <[email protected]> wrote:
>On Fri, Mar 14, 2014 at 05:35:09PM +0000, Vick, Matthew wrote: >> Reading a PCIe register is tricky, since it has to flush any posted >> transactions (meaning all PCIe writes have to complete), send the read >> request, and then actually get the result. It's also important to note >> that reading the clock on i210 is 3 PCIe reads. > >This is very interesting information. I'm wondering if it would make >sense to describe this in the ptp_clock_caps struct as a ratio between >the request and reply delay to allow more accurate transfer of time >from the PHC to the system clock. > >Currently, the offset is calculated as (TS1 + TS2) / 2 - TP, where TS1 >and TS2 are system clock readings made right before and after PHC >reading (TP). In this case something like (TS1 + TS2 * 5) / 6 - TP >would possibly be more accurate. I like the idea of compensating for it, but we don't have a means of reliably gathering the necessary information, since it's completely dependent upon the platform and the state of the system (e.g. different slots in the same system could yield different latencies and even the same slot under different loads). It's more a behavior of PCIe rather than a device-specific quirk we could measure and indicate. Cheers, Matthew ------------------------------------------------------------------------------ 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
