[Linuxptp-users] Question about meanPathDelay (possible bug?)
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Wolfgang W. <wol...@gm...> - 2013-07-30 13:06:36
|
Hello, I have a question about the calculation of the meanPathDelay by the functions process_delay_resp() and clock_path_delay(). The standard says the following about the meanPathDelay computation (section 11.3.2): <meanPathDelay> shall be computed as: <meanPathDelay> = [(t2 - t3) + (receiveTimestamp of Delay_Resp message – originTimestamp of Sync message) – correctionField of Sync message – correctionField of Delay_Resp message]/2. I'm not sure, but I think the "receiveTimestamp of Delay_Resp message"-part is not implemented correctly in LinuxPTP. The function process_delay_resp() calls clock_path_delay() as follows: clock_path_delay(p->clock, p->delay_req->hwts.ts, m->ts.pdu, m->header.correction); The third argument is used by clock_path_delay() as what is called t4 in the standard. As far as I understand the code, the third argument (m->ts.pdu) is the ingress timestamp on the slave of the DelayResp-message. But I think what should be passed here should be the ingress timestamp on the master of the DelayReq-message, which is contained in the "receiveTimestamp"-field of the DelayResp-message (rsp->receiveTimestamp). Any comments on what is actually correct are welcome :) I'm new to LinuxPTP and try to use it to improve my understanding of 1588. regards, Wolfgang Wallner |