Vincent, This is shaping up nicely. I only have a few nits to pick...
On Sun, Feb 14, 2021 at 05:22:09PM -0500, vincent.cheng...@renesas.com wrote: > @@ -1193,6 +1195,9 @@ struct clock *clock_create(enum clock_type type, struct > config *config, > return NULL; > } > > + c->step_window = config_get_int(config, NULL, "step_window"); > + c->step_window_counter = 0; No need to initialize to zero. > @@ -1695,6 +1700,14 @@ int clock_switch_phc(struct clock *c, int phc_index) > return 0; > } > > +static void clock_step_window(struct clock *c) > +{ > + if (!c->step_window) > + return; Please always include curly brackets: if (test) { ... } > + > + c->step_window_counter = c->step_window; > +} > + > static void clock_synchronize_locked(struct clock *c, double adj) > { > clockadj_set_freq(c->clkid, -adj); > @@ -1730,7 +1743,9 @@ enum servo_state clock_synchronize(struct clock *c, > tmv_t ingress, tmv_t origin) > > c->cur.offsetFromMaster = tmv_to_TimeInterval(c->master_offset); > > - if (c->free_running) { > + if (c->free_running || (c->step_window_counter)) { No need for parenthesis here --^ > + if (c->step_window_counter) > + c->step_window_counter--; Curly brackets, please. > return clock_no_adjust(c, ingress, origin); > } Thanks, Richard _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel