On Wed, May 13, 2020 at 09:02:09AM -0700, Gary E. Miller wrote:
> > ntpd expects samples relative to the system clock, so feeding it
> > samples relative to the NIC clock from ptp4l won't work.
> 
> Yeah, clearly broken.  Why would ptp4l ever send anything to ntpd that
> ntpd can not understand?  At least give a warning or error.

ptp4l or phc2sys doesn't know what process is reading that data and
what is doing with it. Ideally, the SHM structure would include an
identifier of the clock and the client could check if it is what it
expects.

> I gave up on timemaster, it is doing too many things that are not
> compatible with my setup.

Well, you don't have to use it, but as a starting point it can print
the configuration and the command lines of the programs that are
needed to synchronize the system clock to a PTP domain using HW
timestamping. You can adapt it as a needed.

Here is an example:

# timemaster -m -n -f <(cat <<EOF
[timemaster]
ntp_program ntpd
[ptp_domain 0]
interfaces eno1
EOF
)
/var/run/timemaster/ntp.conf:

restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
server 127.127.28.0 minpoll 2 maxpoll 2 mode 1
fudge 127.127.28.0 refid PTP0

/var/run/timemaster/ptp4l.0.conf:

[global]
slaveOnly 1
domainNumber 0
uds_address /var/run/timemaster/ptp4l.0.socket
message_tag [0:eno1]

commands:

[0] ntpd -n -c /var/run/timemaster/ntp.conf
[1] ptp4l -l 5 -f /var/run/timemaster/ptp4l.0.conf -H -i eno1
[1] phc2sys -l 5 -a -r -R 1.00 -z /var/run/timemaster/ptp4l.0.socket -t 
[0:eno1] -n 0 -E ntpshm -M 0

-- 
Miroslav Lichvar



_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to