The Telecom Profile invented a new per-port and per-clock attribute, not in 1588, called "localPriority". The use of this attribute is a distinguishing feature of the telecom data set comparison algorithm.
This patch adds the attribute, hard coded to its default value. Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- clock.c | 1 + ds.h | 1 + port.c | 1 + 3 files changed, 3 insertions(+) diff --git a/clock.c b/clock.c index 4179931..d1dbb86 100644 --- a/clock.c +++ b/clock.c @@ -895,6 +895,7 @@ struct clock *clock_create(enum clock_type type, struct config *config, c->dds.flags & DDS_SLAVE_ONLY) { c->dds.clockQuality.clockClass = 255; } + c->default_dataset.localPriority = 128; if (!(c->dds.flags & DDS_TWO_STEP_FLAG)) { switch (timestamping) { diff --git a/ds.h b/ds.h index 0e48d05..9d9c417 100644 --- a/ds.h +++ b/ds.h @@ -55,6 +55,7 @@ struct dataset { struct ClockIdentity identity; struct ClockQuality quality; UInteger8 priority2; + UInteger8 localPriority; /* Telecom Profile only */ UInteger16 stepsRemoved; struct PortIdentity sender; struct PortIdentity receiver; diff --git a/port.c b/port.c index 46db95d..73495d0 100644 --- a/port.c +++ b/port.c @@ -159,6 +159,7 @@ static void announce_to_dataset(struct ptp_message *m, struct port *p, out->identity = a->grandmasterIdentity; out->quality = a->grandmasterClockQuality; out->priority2 = a->grandmasterPriority2; + out->localPriority = 128; out->stepsRemoved = a->stepsRemoved; out->sender = m->header.sourcePortIdentity; out->receiver = p->portIdentity; -- 2.11.0 ------------------------------------------------------------------------------ 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