On Mon, Apr 19, 2021 at 06:11:34PM +0200, Luigi 'Comio' Mantellini wrote: > From: Luigi Mantellini <luigi.mantell...@sm-optics.com> > > The step_window functionality should be defined at the port level because > we cannot assume that different ports have the same sync message rate. > --- > clock.c | 13 +++++++++---- > clock.h | 5 +++-- > config.c | 2 +- > port.c | 18 +++++++++++++++++- > port.h | 7 +++++++ > port_private.h | 1 + > 6 files changed, 38 insertions(+), 8 deletions(-) > > diff --git a/clock.c b/clock.c > index e545a9b..6072ea0 100644 > --- a/clock.c > +++ b/clock.c > @@ -710,6 +710,9 @@ static void clock_update_slave(struct clock *c) > pr_info("updating UTC offset to %d", c->tds.currentUtcOffset); > c->utc_offset = c->tds.currentUtcOffset; > } > + > + // Port changed > + c->step_window_counter = 0; > } > > static int clock_utc_correct(struct clock *c, tmv_t ingress) > @@ -1103,7 +1106,8 @@ struct clock *clock_create(enum clock_type type, struct > config *config, > c->kernel_leap = config_get_int(config, NULL, "kernel_leap"); > c->utc_offset = config_get_int(config, NULL, "utc_offset"); > c->time_source = config_get_int(config, NULL, "timeSource"); > - c->step_window = config_get_int(config, NULL, "step_window"); > + c->step_window = 0; > + c->step_window_counter = 0;
If you really want to move the step window into the port, then delete these fields from the clock data structure. Thanks, Richard _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel