Invert the frequency ratio estimation.

In 802.1AS-2011 the ratio is defined as master/local, so we should follow
suit.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2012-08-31 14:58:24 +02:00
parent 829c785414
commit 1bb8ebbdc5
1 changed files with 2 additions and 2 deletions

View File

@ -198,8 +198,8 @@ static enum servo_state clock_no_adjust(struct clock *c)
*/
origin2 = tmv_add(c->t1, tmv_add(c->c1, c->c2));
if (f->ingress1) {
ratio = tmv_dbl(tmv_sub(c->t2, f->ingress1)) /
tmv_dbl(tmv_sub(origin2, f->origin1));
ratio = tmv_dbl(tmv_sub(origin2, f->origin1)) /
tmv_dbl(tmv_sub(c->t2, f->ingress1));
pr_info("master offset %10lld s%d ratio %.9f path delay %10lld",
c->master_offset, state, ratio, c->path_delay);
}