On Mon, Feb 16, 2015 at 08:48:15PM +0100, Richard Cochran wrote:
> On Fri, Feb 13, 2015 at 01:56:16PM +0100, Miroslav Lichvar wrote:
> > + if (sync_delay_rate <= 0 && servo_weight_samples(c->servo)) {
> > + /* Get new sample delay with updated t1 and t2 */
> > + sample_delay = clock_get_sample_delay(c);
> > +
> > + if (sample_delay > 0 && c->path_delay > 0) {
> > + weight = (double)c->path_delay / sample_delay;
> > + if (weight > 1.0)
> > + weight = 1.0;
> > + pr_debug("delay sample %9" PRId64 " filtered %9" PRId64
> > + " weight %f",
> > + sample_delay, c->path_delay, weight);
> > + c->path_delay = sample_delay;
>
> So now, c->path_delay is set once in clock_path_delay() using
> averaging, and here the averaged value is used for the ratio, but then
> you clobber c->path_delay with the new value?
Yes, I thought the displayed delay should correspond to the offset and
not mix the sample offset with filtered delay. Maybe it would be
cleaner to add a new field to the clock structure for this?
--
Miroslav Lichvar
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel