On Mon, Dec 16, 2019 at 04:04:21PM -0800, Cliff Spradlin via Linuxptp-devel
wrote:
> Could you please check my work?
Hm, I think you are right. We define the offset in terms of the slave
and master time values taken at the same instant:
offset = slave - master
The sysoff_measure() routine provides 'offset' and 'slave', but for
this case we want to reverse the roles. The needed local time stamp
is the 'master' time value:
master = slave - offset
And so the phc2sys.c starting at line 767 should read:
/* use reversed sysoff */
if (sysoff_measure(CLOCKID_TO_FD(clock->clkid),
clock->sysoff_method,
node->phc_readings,
&offset, &ts, &delay) < 0)
return -1;
offset = -offset;
ts += offset;
Miroslav, care to double check that?
Thanks,
Richard
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel