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 <richardcochran@gmail.com>
master
Richard Cochran 2018-08-05 21:15:59 -07:00
parent da06ea5a3a
commit a2740768b6
1 changed files with 2 additions and 0 deletions

2
port.c
View File

@ -1968,6 +1968,8 @@ int process_pdelay_req(struct port *p, struct ptp_message *m)
*/ */
if (p->timestamping == TS_P2P1STEP) { if (p->timestamping == TS_P2P1STEP) {
rsp->header.correction = m->header.correction; rsp->header.correction = m->header.correction;
rsp->header.correction += p->tx_timestamp_offset;
rsp->header.correction += p->rx_timestamp_offset;
} else { } else {
rsp->header.flagField[0] |= TWO_STEP; rsp->header.flagField[0] |= TWO_STEP;
rsp->pdelay_resp.requestReceiptTimestamp = rsp->pdelay_resp.requestReceiptTimestamp =