目录
Oleg Obleukhov

Pair the pdelay correction fields with what the responder sends

Summary: D119082670 swapped the two correction fields in the pdelay requester, on the authority of the package doc. That doc was stale: it predates D114905731 (2026-08-06), which made the two-step responder relay the Pdelay_Req correctionField in the Pdelay_Resp_Follow_Up (IEEE 1588 11.4.2) and send the Pdelay_Resp with a zero one. The Pdelay_Req never reaches the requester, so the follow-up is the only carrier of the REQUEST path, and the Pdelay_Resp carries only what transparent clocks accrue on the way back.

PathDelay() adds the two fields, so it never noticed. Offset() subtracts them and was off by the full TC residence asymmetry, and cf_req / cf_resp in ptpcheck output were mislabelled. Latent while no transparent clock is in path (both fields are zero); live the moment one is, which is the only reason the fields exist.

  • ping.go: Pdelay_Resp -> CorrectionFieldResp, Pdelay_Resp_Follow_Up -> CorrectionFieldReq
  • pdelay.go and protocol.go now say which message carries which path and why, at the producer and at the consumer, so the next reader does not have to re-derive it
  • the old test hand-stuffed both correction fields, so it asserted the convention rather than the wire and passed whichever way round they were. It now drives the real ptp.RespPDelay / ptp.RespFollowUpPDelay from a Pdelay_Req that carries a correction, and protocol_test asserts RespPDelay leaves the correctionField at zero

Differential Revision: D119801230

fbshipit-source-id: 813640325a884a423237b6bdb233e6eb0c0f8748

24小时前1341次提交

Time

lint test codecov Go Report Card GitHub go.mod Go version GoDoc License

Contents

Documentation

Collection of Meta’s Time Libraries such as NTP and PTP

cmd

All executables provided by this repo.

NTP

NTP-specific libraries, including protocol implementation.

PTP

PTP-specific libraries, including protocol implementation.

Leaphash

Utility package for computing the hash value of the official leap-second.list document

leapsectz

Utility package for obtaining leap second information from the system timezone database

PHC

Library to work with PTP Hardware Clock (PHC).

Timestamp

Library to work with NIC hardware/software timestamps.

oscillatord

Implementation of monitoring protocol used by Orolia oscillatord.

Calnex

Command line tool and library for a Calnex Sentinel device.

Caliper

Command line tool for parsing Luciol OTDR trace files when measuring system/cable latencies of Huber-Suhner GNSS-over-fiber systems

sa53

Command line tool and library for the Microchip SA53 atomic clock on Celestica time cards.

fbclock

Client C library and Go daemon to provide TrueTime API based on PTP time.

servo

Pi servo library

clock

Wrapper around CLOCK_ADJTIME syscall

NTRIP

NTRIP v1 SOURCE client library for pushing RTCM correction data to an NTRIP caster. Supports HTTP CONNECT proxy with TLS client certificate authentication.

ntripper

Command line tool that reads RTCM3 and UBX-RXM-RAWX data from an oscillatord Unix socket and pushes RTCM corrections to an NTRIP caster, generating MSM7 messages from raw observations when available.

RTCM

Parser and scanner for RTCM 10403.x (RTCM3) binary frames used for GNSS correction data. Includes CRC-24Q validation and stream synchronization.

License

time is licensed under Apache 2.0 as found in the LICENSE file.

关于
6.3 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号