On Thu, Feb 11, 2021 at 10:17:32AM +0000, Karthikkumar V wrote:
> 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).

The premise of this patch seems okay to me.  Please address my
comments, below...

> diff --git a/config.c b/config.c
> index 4095b33..41735d3 100644
> --- a/config.c
> +++ b/config.c
> @@ -332,6 +332,7 @@ struct config_item config_tab[] = {
>       GLOB_ITEM_INT("utc_offset", CURRENT_UTC_OFFSET, 0, INT_MAX),
>       GLOB_ITEM_INT("verbose", 0, 0, 1),
>       GLOB_ITEM_INT("write_phase_mode", 0, 0, 1),
> +     GLOB_ITEM_INT("clockClassThreshold", CLOCK_CLASS_THRESHOLD_DEFAULT, 6, 
> CLOCK_CLASS_THRESHOLD_DEFAULT),

Preserve alphabetical order, please.

> diff --git a/port.c b/port.c
> index f44d239..ae2a00e 100644
> --- a/port.c
> +++ b/port.c
> @@ -1861,6 +1861,11 @@ int process_announce(struct port *p, struct 
> ptp_message *m)
>               return result;
>       }
>  
> +     /* If the clock class is greater than clock_class_threshold , ignore 
> this master */

This comment restates what the code does, and so it is not needed.

> +     if(m->announce.grandmasterClockQuality.clockClass > 
> clock_get_clock_class_threshold(p->clock)){

Please observe CODING_STYLE.org.

Consider adding a rate limited log message at this point (using one of
the pl_ macros from print.h).  This might help admins catch
mis-configured networks.

> +             return result;
> +     }

Thanks,
Richard


_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to