From a2740768b6025c2c4241ac858a45dd3c6554fced Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 5 Aug 2018 21:15:59 -0700 Subject: [PATCH] Apply ingress and egress latency corrections in P2P one step mode. When using peer to peer one step mode, the normal time stamp handling of peer delay request messages is bypassed. The hardware subtracts the ingress time stamp from the correction field and then adds the egress time into the correction of the response. The configured latency values are never applied since the hardware has no knowledge of them. This patch adds in the correction values in this special case. Signed-off-by: Richard Cochran --- port.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/port.c b/port.c index e85f9fa..6f5408e 100644 --- a/port.c +++ b/port.c @@ -1968,6 +1968,8 @@ int process_pdelay_req(struct port *p, struct ptp_message *m) */ if (p->timestamping == TS_P2P1STEP) { rsp->header.correction = m->header.correction; + rsp->header.correction += p->tx_timestamp_offset; + rsp->header.correction += p->rx_timestamp_offset; } else { rsp->header.flagField[0] |= TWO_STEP; rsp->pdelay_resp.requestReceiptTimestamp =