[zeromq-dev] Precision Timestamping

Steven McCoy steven.mccoy at miru.hk
Wed Sep 7 05:13:58 CEST 2011

On 6 September 2011 17:54, Ilya Dmitrichenko <errordeveloper at gmail.com>wrote:

> On 5 September 2011 23:23, Pieter Hintjens <ph at imatix.com> wrote:
> > What APIs are available for working with PTP?
> PTP had been around for a while, IEEE has two revisions 1588-2002
> and 1588-2008 which are referred to as PTP and PTPv2 respectively.
> /usr/src/linux/Documentation/networking/timestamping.txt
> there is also a directory with examples:
> /usr/src/linux/Documentation/networking/timestamping/
> these are certainly present in 2.6.39.
All my research has shown packet timestamping to be completely worthless
without hardware support, and even then it is a minefield.  You can see from
the revision in the kernel support that there have been many problems to
overcome.  Similarly documented quite well in MSDN for Windows is that there
is no clock synchronisation between the NIC and the communicating CPU, you
can get drift everywhere.

Within OpenPGM I stamp with internal timer per incoming packet and make that
timestamp available all the way through and so if the underlying API
provided a stable solution it could be easily changed.  The accuracy is
highly important to the PGM protocol as you need to use the CPU timer to
calculate state timeouts from the packet timestamp.

Reading the time can be quite expensive which is why it is nice to propagate
the time up, but it is even better if you don't have to read it at all.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110907/2b3dd2db/attachment.htm>

More information about the zeromq-dev mailing list