On Thu, Oct 22, 2015 at 10:45:05AM +0200, Richard Cochran wrote:
>       t23 = tmv_sub(tsp->t2, tsp->t3);
>       if (tsp->clock_rate_ratio != 1.0)
>               t23 = dbl_tmv(tmv_dbl(t23) * tsp->clock_rate_ratio);
>       t41 = tmv_sub(tsp->t4, tsp->t1);
>       delay = tmv_div(tmv_add(t23, t41), 2);
> 
> The ratio peer/local is applied to t3-t2, but these are peer time
> stamps to begin with!  That scaling is wrong, and even if the code did
> (t2-t3)*(1/rr), it would still change the meaning of the peer delay,
> since it would be then expressed in the local time base.

The math in the tsproc code was supposed to be identical to the code
it replaced. t2 and t3 in tsproc are local times. The mapping between
the port and tsproc timestamps is (t1, t2, t3, t4) -> (t3, t4, t1, t2).
Maybe it wasn't the best idea to use the same variable names in all
three (clock, port, tsproc) contexts?

Anyway, does this actually break something?

-- 
Miroslav Lichvar

------------------------------------------------------------------------------
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to