Re: [chrony-users] Relation between hwtimestamp and PTP clocks

[ Thread Index | Date Index | More Archives ]

On Fri, Jun 23, 2023 at 11:11:21AM +0000, Linas Zvirblis wrote:
> Does that mean that chrony is adjusting the PHC by itself? Is
> 'hwtimestamp' for PHC equivalent to 'rtcsync' for RTC? My experience
> says no.

Functionaly it's closer to rtcdrift.

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

Yes, that would lead to instability.

> 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?

They can both use hardware timestamping, but there needs to be a
virtual PHC created on top of the real PHC for ptp4l, so it doesn't
disrupt chrony. It's a new feature added in linux-5.14 and now
supported in linuxptp-4.0.

A vclock can be created like this
echo 1 > /sys/class/ptp/ptp0/n_vclocks

If if created /dev/ptp1, you would start ptp4l with --phc_index 1.

Miroslav Lichvar

To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.

Mail converted by MHonArc 2.6.19+