clock: Calculate frequency offset even without any delay estimation.

If the "free_running" option is set, the "no adjust" calculates and
prints an estimation of the phase and frequency offsets to the remote
master.  Because the phase estimate requires a delay measurement, this
calculation is not performed without having the delay estimate first.
However, a typical transparent clock application will want to use the
frequency offset to correct the residence times to match the master's
frequency.

This patch adds a call to the "no adjust" routine even if no valid
delay measurement has been made.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2018-03-23 08:26:01 -07:00
parent 51b540875f
commit eb8507a45a
1 changed files with 5 additions and 1 deletions

View File

@ -1599,8 +1599,12 @@ enum servo_state clock_synchronize(struct clock *c, tmv_t ingress, tmv_t origin)
tsproc_down_ts(c->tsproc, origin, ingress); tsproc_down_ts(c->tsproc, origin, ingress);
if (tsproc_update_offset(c->tsproc, &c->master_offset, &weight)) { if (tsproc_update_offset(c->tsproc, &c->master_offset, &weight)) {
if (c->free_running) {
return clock_no_adjust(c, ingress, origin);
} else {
return state; return state;
} }
}
if (clock_utc_correct(c, ingress)) { if (clock_utc_correct(c, ingress)) {
return c->servo_state; return c->servo_state;