> -----Original Message-----
> From: Miroslav Lichvar <mlich...@redhat.com>
> Sent: Monday, October 24, 2022 5:43 AM
> To: Keller, Jacob E <jacob.e.kel...@intel.com>
> Cc: linuxptp-devel@lists.sourceforge.net
> Subject: Re: [Linuxptp-devel] [PATCH v2 4/4] Extend clockcheck to check for
> changes in frequency.
> 
> On Thu, Oct 20, 2022 at 04:50:37PM +0000, Keller, Jacob E wrote:
> > > index f0141be..b5a69cc 100644
> > > --- a/clockcheck.c
> > > +++ b/clockcheck.c
> > > @@ -123,6 +123,16 @@ void clockcheck_set_freq(struct clockcheck *cc, int
> freq)
> > >   cc->freq_known = 1;
> > >  }
> > >
> > > +int clockcheck_freq(struct clockcheck *cc, int freq)
> > > +{
> > > + /* Allow difference of 1 ppb due to conversion to/from double */
> > > + if (cc->freq_known && abs(cc->current_freq - freq) > 1) {
> > > +         pr_warning("clockcheck: clock frequency changed
> > > unexpectedly!");
> >
> >
> > The modified documentation would make me think this should allow up to the
> sanity_freq_limit as a difference? Perhaps the documentation should be
> improved somewhat to clarify the difference?
> 
> If I expand the description a bit, is it better?
> 
> .B sanity_freq_limit
> The maximum allowed frequency offset between uncorrected clock and the
> system
> monotonic clock in parts per billion (ppb). This is used as a sanity check of
> the synchronized clock. When a larger offset is measured, a warning message
> will be printed and the servo will be reset. If the frequency correction set 
> by
> ptp4l changes unexpectedly between updates of the clock (e.g. due to another
> process trying to control the clock), a warning message will be printed. When
> set to 0, the sanity check is disabled. The default is 200000000 (20%).
> 
> 
> If not, what would you suggest?
> 

I like this better!

Thanks,
Jake

> Thanks,
> 
> --
> Miroslav Lichvar



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to