]> git.ipfire.org Git - thirdparty/chrony.git/commit
ntp: extend local timestamp for PTP correction
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 26 Sep 2023 10:14:56 +0000 (12:14 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 26 Sep 2023 13:10:19 +0000 (15:10 +0200)
commitb0267475e33c49db9ca33023468b96c55cfacc68
treec2dd8fc24721fed697d7caaf9f4f71585ebaaa9a
parent07134f262518de5e4d7dcd99300ed503e8fa3b8f
ntp: extend local timestamp for PTP correction

Add two new fields to the NTP_Local_Timestamp structure:
- receive duration as the time it takes to receive the ethernet frame,
  currently known only with HW timestamping
- network correction as a generalized PTP correction

The PTP correction is provided by transparent clocks in the correction
field of PTP messages to remove the receive, processing and queueing
delays of network switches and routers. Only one-step end-to-end unicast
transparent clocks are useful for NTP-over-PTP. Two-step transparent
clocks use follow-up messages and peer-to-peer transparent clocks don't
handle delay requests.

The RX duration will be included in the network correction to compensate
for asymmetric link speeds of the server and client as the NTP RX
timestamp corresponds to the end of the reception (in order to
compensate for the asymmetry in the normal case when no corrections
are applied).
ntp_core.c
ntp_core.h
ntp_io.c
test/unit/ntp_core.c