On Mon, 2017-04-03 at 09:20 +0200, Burkhard Ilsen wrote: > Hello everyone, >
Hi, Just FYI, this mailing lists preference is to send plain-text emails if possible. > while debugging my 802.1AS endpoint I recognized that the servo was > idle after the first step. > It stopped processing sync messages until the next peer delay was > measured. > The reason is that t3 is reset after the first step letting > tsproc_update_offset() fail. > I think tsproc_update_offset() should not fail in this case because > the filtered delay is still available and t3 is not needed. > T3 is needed only when using raw_mode or weighting. > This makes sense to me, if we don't need t3 then we shouldn't be erroring out when there isn't a t3 value. Thanks, Jake > I propose checking the variables only if they are used: > > --- a\tsproc.c > +++ b\tsproc.c > @@ -163,12 +163,17 @@ > { > tmv_t delay, raw_delay = 0; > > - if (tmv_is_zero(tsp->t1) || tmv_is_zero(tsp->t2) || > - tmv_is_zero(tsp->t3)) > + if (tmv_is_zero(tsp->t1) || tmv_is_zero(tsp->t2)) > return -1; > > - if (tsp->raw_mode || tsp->weighting) > + if (!tsp->raw_mode && tmv_is_zero(tsp->filtered_delay)) > + return -1; > + > + if (tsp->raw_mode || tsp->weighting) { > + if (tmv_is_zero(tsp->t3)) > + return -1; > raw_delay = get_raw_delay(tsp); > + } > > delay = tsp->raw_mode ? raw_delay : tsp->filtered_delay; > > > ------------------------------------------------------------------- > ----------- > 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 ------------------------------------------------------------------------------ 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