Re: [Linuxptp-devel] Peer delay regression in v1.6

2015-10-23 Thread Richard Cochran
> 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). Oh, tricky! Now I vaguely recall that from the original review. > Maybe it wasn

Re: [Linuxptp-devel] Peer delay regression in v1.6

2015-10-23 Thread Miroslav Lichvar
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)

Re: [Linuxptp-devel] Peer delay regression in v1.6

2015-10-22 Thread Delio Brignoli
Hello Richard, Thank you for spotting this issue. We haven’t been hit by it (yet!) because we use an old version of linuxptp. I hope to be able to move to a more recent release at some point. The fix you propose seems good to me. Thanks! -- Delio Brignoli AudioScience Inc On 22 Oct 2015, at 10

[Linuxptp-devel] Peer delay regression in v1.6

2015-10-22 Thread Richard Cochran
We figure the neighbor rate ratio in port_nrate_calculate(): delta t3 / delta t4 = peer_interval / local_interval Originally the peer delay was figured like this: pd = tmv_sub(tmv_sub(t4, t1), tmv_sub(t3, t2)); Since t4-t1 are local, and t3-t2 are from the peer, there will be