On Thu, Aug 30, 2018 at 04:54:37PM -0700, Vedang Patel wrote:
> diff --git a/bmc.c b/bmc.c
> index 3c3db828764b..b0a80c2198cb 100644
> --- a/bmc.c
> +++ b/bmc.c
> @@ -126,6 +126,17 @@ enum port_state bmc_state_decision(struct clock *c, 
> struct port *r,
>       port_best = port_best_foreign(r);
>       ps = port_state(r);
>  
> +     /*
> +      * This scenario is particularly important in the designated_slave_fsm
> +      * when it is in PS_UNCALIBRATED state. In this scenario, there is no
> +      * other foriegn master and it will elect itself as master ultimately
> +      * resulting in printing out some unnecessary warnings (see
> +      * port_slave_priority_warning()).
> +      */
> +     if (!port_best && port_bmca(r) == BMCA_NOOP) {
> +             return ps;
> +     }

Put this special case into port_slave_priority_warning().

Remember: if you hack the core code, then you are probably doing it wrong.

Thanks,
Richard


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to