[chrony-users] Relation between hwtimestamp and PTP clocks

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Hello everyone,

I am writing because I am having hard time finding any definitive
answer on how to use 'hwtimestamp' with chrony correctly.

The manual for hwtimestamp states the following:

> The network interface controller (NIC) uses its own clock to
> accurately timestamp the actual transmissions and receptions, [...]
> This can significantly improve the accuracy of the timestamps and the
> measured offset, [...] In order to get the best results, both sides
> receiving and sending NTP packets (i.e. server and client, or two
> peers) need to use HW timestamping.

But the PTP Hardware Clock (PHC) is free running, and can be wildly
different between the client and the server.

> When chronyd is running, no other process (e.g. a PTP daemon) should
> be working with the NIC clock.

Does that mean that chrony is adjusting the PHC by itself? Is
'hwtimestamp' for PHC equivalent to 'rtcsync' for RTC? My experience
says no.

Then how can 2 unsynchronized PTP clocks be used for timestamping
between the client and the server?

To make things even more interesting, I have some devices on the
network that only understand PTP, but I only have NTP time source. To
keep the devices in sync, I would let chrony set the system clock, then
use phc2sys to set the PTP clock, and run ptp4l pretending to be the
grandmaster to serve PTP from the same server as NTP. Basically as
described in [1].

My question is, would running with 'hwtimestamp eth0' in chrony and
'phc2sys -O 37 -s CLOCK_REALTIME -c eth0' interfere with each other?

Can I run multiple processes (chrony and ptp4l) using hardware
timestamping on the same network interface, or does one of them have to
use software timestamping?

I may be completely misunderstanding some of the finer points of how
this works, so I can only hope that my questions are clear. Would
really appreciate some guidance here. 

Kind regards,
Linas

[1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s0-serving_ntp_time_with_ptp



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/