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 <richardcoch...@gmail.com> --- clock.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/clock.c b/clock.c index 46fa5f2..ed440d7 100644 --- a/clock.c +++ b/clock.c @@ -1591,8 +1591,13 @@ enum servo_state clock_synchronize(struct clock *c, tmv_t ingress, tmv_t origin) tsproc_down_ts(c->tsproc, origin, ingress); - if (tsproc_update_offset(c->tsproc, &c->master_offset, &weight)) - return state; + if (tsproc_update_offset(c->tsproc, &c->master_offset, &weight)) { + if (c->free_running) { + return clock_no_adjust(c, ingress, origin); + } else { + return state; + } + } if (clock_utc_correct(c, ingress)) return c->servo_state; -- 2.11.0 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel