On Mon, May 24, 2021 at 11:24:47AM +0200, Miroslav Lichvar wrote:
> Is there something else that is not already covered by the
> clock_update_time_properties() call from port.c?
Let's see...
void clock_update_time_properties(struct clock *c, struct
timePropertiesDS tds)
{
c->tds = tds;
}
That is just the TDS. The other method has more...
static void clock_update_slave(struct clock *c)
c->cur.stepsRemoved = 1 +
c->best->dataset.stepsRemoved;
This could change if the network topology changes.
pds->parentPortIdentity = c->best->dataset.sender;
Ditto.
pds->grandmasterIdentity =
msg->announce.grandmasterIdentity;
I guess this won't change, but
pds->grandmasterClockQuality =
msg->announce.grandmasterClockQuality;
pds->grandmasterPriority1 =
msg->announce.grandmasterPriority1;
pds->grandmasterPriority2 =
msg->announce.grandmasterPriority2;
these three could change, even if the GM remains the same.
c->tds.currentUtcOffset = msg->announce.currentUtcOffset;
c->tds.flags = msg->header.flagField[1];
c->tds.timeSource = msg->announce.timeSource;
if ((c->tds.flags & UTC_OFF_VALID && c->tds.flags &
TIME_TRACEABLE) ||
(c->tds.currentUtcOffset > c->utc_offset)) {
pr_info("updating UTC offset to %d",
c->tds.currentUtcOffset);
c->utc_offset = c->tds.currentUtcOffset;
This update only happens here and not in clock_update_time_properties().
}
Thanks,
Richard
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel