[ntp:hackers] timespec vs timeval

Martin Burnicki martin.burnicki at meinberg.de
Sun Oct 28 21:17:15 UTC 2007


Guys,

Danny Mayer wrote:
> Jean-Francois Argentino wrote:
> > Hello all,
> >
> >  > The NI device support is peculliar to Windows and uses an embedded ARM
> >  > processor on the card. I suspect the ARM and driver code are highly
> >  > propriatary. There could be other 1588 cards, but so far nonGoogled.
> >
> > I've found this board which timestamp packets by hardware:
> > http://www.ines.zhwin.ch/index.php?id=63&L=2
> > It can be purchased for sure with the "IEEE 1588 Starter kit" provided
> > by MEINBERG ("http://www.meinberg.de/english/ptp-starterkit/"). I can
> > buy it stand alone (in France with www.jtelec.fr), it's quite expensive
> > (1200 €), but they provide driver for linux (and their sources).
> >
> > Another word about timestamp resolution, I think you can set the socket
> > option SO_TIMESTAMPNS instead of SO_TIMESTAMP to get a timespec instead
> > of timeval , the corresponding cmsg_type is SCM_TIMESTAMPNS, this is
> > true for Linux kernel 2.6.23, I don't know for older release.
> >
> > A word about me, I'm not a kernel Linux hacker, and I'm a PTP/NTP newby,
> > I just begin to experiment with network synchronization solutions,
> > that's why I found this thread.
> >
> > JF.
>
> There's been a big discussion this week in the NTP WG on IEEE1588 and
> the hardware timestamps that it provides. It needs driver support to be
> useful and there are a host of other details needed to get it to work
> with NTP. Martin can probably chime in here with more details,
> especially as Meinberg is the hardware you referenced.

Just for clarification:

The PCI card quoted above, and also the drivers for that card, have been 
developed by the InES, an institute of the Zurich University, located in 
Winterthur, Switzerland. The InES is strongly involved in the development and 
standardization of PTP/IEEE1588. I'm not too familiar with that board.

Meinberg has put the PTP starter kit together in order to make a set of PTP 
devices available to people who want to get experienced with PTP, i.e. to 
find out what it can do, and what it cant't (e.g. if there are switched 
involved which are not PTP-aware). We also just buy the PCI card from InES, 
just like we buy the swtch in the PTP starter kit from Hirschmann.

Jtelec is the official distributor of Meinberg in France.

As already mentioned in the NTPWG mailing list, we at Meinberg have made tests 
with hardware timestamping for NTP and found that under the same conditions 
as PTP NTP can yield the same accuracy as PTP.

It would be useful if there were a standard way to pass those hardware 
timestamps from the driver up to the application. However, there must be also 
a defined way for NTP to send a kind of follow-up message like PTP, which 
lets the receiver of an NTP packet know when the packet went on the wire at 
the transmitting side, without breaking the compatibility of the protocol.

We've also discussed this here at Meinberg, and an idea was to add such a 
feature to an NTP specification v5.

So an NTP v5 server could send follow-up packet to an NTP v5 client, and just 
send a standard NTP packet back to clients which claim to be v3 or v4.

On the other hand, if a v5 client would send a request to a v4 server the v4 
server would clamp the version in the reply packet to v4, so the client would 
see that it mustn't expect a follow-up packet.

Of course this had to be discussed in detail, but I think this list is a good 
place to do so.


Martin
-- 
Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont
Germany


More information about the hackers mailing list