On Sat, Oct 02, 2021 at 07:09:02AM -0700, Richard Cochran wrote:
> The function, clock_time_properties, is a query that should not change
> the program state.

So, would you like to move it to a new function, e.g.
clock_update_time_properties()?

> With this change, one call chain will be:
> 
> port_tx_announce
>  clock_time_properties
>   clock_update_utc_offset
>    clock_update_grandmaster
> 
> That clobbers the grandmasterIdentity with the local dds.clockIdentity
> in case of BC.

The function specifically checks for grandmaster:

> > +   /* Don't do anything if not a grandmaster with a leap flag set. */
> > +   if (c->cur.stepsRemoved > 0 || leap == 0) {
> > +           return;
> > +   }
> > +

If it's a BC, stepsRemoved should be larger than zero, right? I
thought that was easier than looking for a port in the slave state.

-- 
Miroslav Lichvar



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

Reply via email to