Re: Relation between hwtimestamp and PTP clocks

Miroslav Lichvar <[email protected]>
Newsgroups gmane.comp.time.chrony.user
Message-ID <ZJk6HsJnfng0OPGj@localhost>
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-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org 
with "unsubscribe" in the subject.
For help email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org 
with "help" in the subject.
Trouble?  Email [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.