Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- clock.c | 3 ++- config.c | 1 + default.cfg | 1 + gPTP.cfg | 1 + ptp4l.8 | 14 ++++++++++++++ 5 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/clock.c b/clock.c index d1dbb86..ac57cb5 100644 --- a/clock.c +++ b/clock.c @@ -895,7 +895,8 @@ 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; + c->default_dataset.localPriority = + config_get_int(config, NULL, "defaultDS.localPriority"); if (!(c->dds.flags & DDS_TWO_STEP_FLAG)) { switch (timestamping) { diff --git a/config.c b/config.c index e6fe676..3d1a752 100644 --- a/config.c +++ b/config.c @@ -176,6 +176,7 @@ struct config_item config_tab[] = { GLOB_ITEM_INT("clockAccuracy", 0xfe, 0, UINT8_MAX), GLOB_ITEM_INT("clockClass", 248, 0, UINT8_MAX), GLOB_ITEM_ENU("clock_servo", CLOCK_SERVO_PI, clock_servo_enu), + GLOB_ITEM_INT("defaultDS.localPriority", 128, 1, UINT8_MAX), PORT_ITEM_INT("delayAsymmetry", 0, INT_MIN, INT_MAX), PORT_ITEM_ENU("delay_filter", FILTER_MOVING_MEDIAN, delay_filter_enu), PORT_ITEM_INT("delay_filter_length", 10, 1, INT_MAX), diff --git a/default.cfg b/default.cfg index ebb263a..1b5f493 100644 --- a/default.cfg +++ b/default.cfg @@ -13,6 +13,7 @@ clockAccuracy 0xFE offsetScaledLogVariance 0xFFFF free_running 0 freq_est_interval 1 +defaultDS.localPriority 128 dscp_event 0 dscp_general 0 # diff --git a/gPTP.cfg b/gPTP.cfg index 142996a..d9a0140 100644 --- a/gPTP.cfg +++ b/gPTP.cfg @@ -13,6 +13,7 @@ clockAccuracy 0xFE offsetScaledLogVariance 0xFFFF free_running 0 freq_est_interval 1 +defaultDS.localPriority 128 # # Port Data Set # diff --git a/ptp4l.8 b/ptp4l.8 index a724151..1e43458 100644 --- a/ptp4l.8 +++ b/ptp4l.8 @@ -323,6 +323,20 @@ The offsetScaledLogVariance attribute of the local clock. It characterizes the stability of the clock. The default is 0xFFFF. .TP +.B defaultDS.localPriority +The Telecom Profile (ITU-T G.8275.1) specifies an alternate Best +Master Clock Algorithm (BMCA) with a unique data set comparison +algorithm. The value of this option is associated with the local +clock and is used as a tie breaker whenever clockClass, clockAccuracy, +offsetScaledLogVariance, and priority2 are equal. This option is only +used when "dataset_comparison" is set to "telecom". +The default value is 128. + +Warning: the BMCA is guaranteed to produce a spanning tree (that is, a +timing network without loops) only when using the default values of +defaultDS.localPriority and portDS.localPriority. Careful network +engineering is needed when using non-default values. +.TP .B domainNumber The domain attribute of the local clock. The default is 0. -- 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