This fixes cumulativeScaledRateOffset reported in TIME_STATUS_NP before
the rate ratio is updated from port.

Signed-off-by: Miroslav Lichvar <[email protected]>
---
 clock.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/clock.c b/clock.c
index 8d512ca..219436f 100644
--- a/clock.c
+++ b/clock.c
@@ -646,6 +646,7 @@ struct clock *clock_create(int phc_index, struct interface 
*iface, int count,
                pr_err("Failed to create delay filter");
                return NULL;
        }
+       c->nrr = 1.0;
        c->stats_interval = dds->stats_interval;
        c->stats.offset = stats_create();
        c->stats.freq = stats_create();
@@ -1188,6 +1189,7 @@ static void handle_state_decision_event(struct clock *c)
                c->t1 = tmv_zero();
                c->t2 = tmv_zero();
                c->path_delay = 0;
+               c->nrr = 1.0;
                fresh_best = 1;
        }
 
-- 
1.8.4.2


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to