Incorporated Review Comments. This code changes brings in the ability to program the acceptable clockClass threshold beyond which device will move to holdover/free-run. Default clockClass threshold is 248. Example Use-Case: This is needed in the cases where T-SC/T-BC Slave might want to listen only on PRC clockCLass and anything beyond that might not be acceptible and would want to go to holdover (with SyncE backup or internal oscillator).
Signed-off-by: Karthikkumar V <kval...@altiostar.com> Signed-off-by: Ramana Reddy <rre...@altiostar.com> --- clock.c | 9 +++------ configs/default.cfg | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/clock.c b/clock.c index 6dd4661..0879e9b 100644 --- a/clock.c +++ b/clock.c @@ -136,7 +136,7 @@ struct clock { struct monitor *slave_event_monitor; int step_window_counter; int step_window; - UInteger8 clock_class_threshold; + UInteger8 clock_class_threshold; }; struct clock the_clock; @@ -979,7 +979,7 @@ struct clock *clock_create(enum clock_type type, struct config *config, c->default_dataset.localPriority = config_get_int(config, NULL, "G.8275.defaultDS.localPriority"); c->max_steps_removed = config_get_int(config, NULL,"maxStepsRemoved"); - c->clock_class_threshold = config_get_int(config, NULL, "clock_class_threshold"); + c->clock_class_threshold = config_get_int(config, NULL, "clock_class_threshold"); /* Harmonize the twoStepFlag with the time_stamping option. */ if (config_harmonize_onestep(config)) { @@ -1715,10 +1715,7 @@ UInteger8 clock_max_steps_removed(struct clock *c) UInteger8 clock_get_clock_class_threshold(struct clock *c) { - if (c != NULL) { - return c->clock_class_threshold; - } - return CLOCK_CLASS_THRESHOLD_DEFAULT; /* Return Default Value */ + return c->clock_class_threshold; } diff --git a/configs/default.cfg b/configs/default.cfg index 3054ad6..b2ffa94 100644 --- a/configs/default.cfg +++ b/configs/default.cfg @@ -29,7 +29,6 @@ logMinDelayReqInterval 0 logMinPdelayReqInterval 0 operLogPdelayReqInterval 0 announceReceiptTimeout 3 -clock_class_threshold 248 syncReceiptTimeout 0 delayAsymmetry 0 fault_reset_interval 4 @@ -61,6 +60,7 @@ verbose 0 summary_interval 0 kernel_leap 1 check_fup_sync 0 +clock_class_threshold 248 # # Servo Options # -- 1.8.3.1 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel