The Telecom Profiles G.8275.1 and G.8275.2 have 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 afee960..cd7f850 100644 --- a/clock.c +++ b/clock.c @@ -926,6 +926,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; /* Harmonize the twoStepFlag with the time_stamping option. */ if (config_harmonize_onestep(config)) { 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 1757dfe..d858027 100644 --- a/port.c +++ b/port.c @@ -77,6 +77,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