> -----Original Message----- > From: Burkhard Ilsen [mailto:burkhardil...@gmail.com] > Sent: Friday, April 07, 2017 3:32 PM > To: linuxptp-devel@lists.sourceforge.net > Subject: [Linuxptp-devel] [PATCH] port: sequence of nrate and peer_delay > calculation > > The sequence of port_nrate_calculate() and tsproc_update_delay() > in port_peer_delay() is mixed up. > The peer delay depends on the nrate ratio so the nrate ratio > shall be updated before peer delay is calculated. > > Signed-off-by: Burkhard Ilsen <burkhardil...@gmail.com> > --- > port.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/port.c b/port.c > index 0f99b1b..2febe67 100644 > --- a/port.c > +++ b/port.c > @@ -1892,6 +1892,9 @@ static void port_peer_delay(struct port *p) > c2 = correction_to_tmv(fup->header.correction); > calc: > t3c = tmv_add(t3, tmv_add(c1, c2)); > + > + if (p->follow_up_info) > + port_nrate_calculate(p, t3c, t4); > tsproc_set_clock_rate_ratio(p->tsproc, p->nrate.ratio * > clock_rate_ratio(p->clock)); > tsproc_up_ts(p->tsproc, t1, t2); > @@ -1901,9 +1904,6 @@ calc: > > p->peerMeanPathDelay = tmv_to_TimeInterval(p->peer_delay); > > - if (p->follow_up_info) > - port_nrate_calculate(p, t3c, t4); > - > if (p->state == PS_UNCALIBRATED || p->state == PS_SLAVE) { > clock_peer_delay(p->clock, p->peer_delay, t1, t2, > p->nrate.ratio); > --
This one looks straight forward and correct to me. Thanks, Jake > 2.12.2.windows.1 > > > ------------------------------------------------------------------------------ > 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