Re: [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-31 08:41:21
|
On Tue, 30 Jul 2013 17:46:58 +0200, Miroslav Lichvar <mli...@re...> wrote: > On Tue, Jul 30, 2013 at 03:06:28PM +0200, Wolfgang Wallner wrote: >> 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). > > To me, it seems it's the DelayResp receiveTimestamp in the ts.pdu > field and used as t4 in the delay calculation. It's filled by the > following code in the msg_post_recv() function. > > case DELAY_RESP: > timestamp_post_recv(m, &m->delay_resp.receiveTimestamp); Oh, thanks for making this clear :) > > Why do you think it's the ingress time of the DelayResp message? Because at first I misinterpreted the standard. When it says "receiveTimestamp of Delay_Resp message" I thought of the Ingress timestamp of DelayResp. I was confused, and had a look at the source code of LinuxPTP. I found "m->ts.pdu", which at first looks like a timestamp assigned by a lower layer, e.g. the ingress timestamp. I did not think of the possibility that the lower layer puts the value of delay_resp.receiveTimestamp into this field. Sorry for broadcasting my confusion, I should have dug deeper in the code :) Thanks for clearing this up, Wolfgang |