Hi Richard,

not a problem, of course. I'm just speaking about code cleanup.

luigi

Il giorno mar 4 mag 2021 alle ore 14:00 Richard Cochran <
richardcoch...@gmail.com> ha scritto:

> On Mon, May 03, 2021 at 06:45:56PM +0200, Luigi 'Comio' Mantellini wrote:
> > /*
> > * A port going down can affect the BMCA result.
> > * Force a state decision event.
> > */
> > if (p->link_status & LINK_DOWN)
> > clock_set_sde(p->clock, 1);
> >
> > I think that should be removed
>
> Why?  What problem does it cause?
>
> > because the calling code look like this:
> >
> >     case FD_RTNL:
> >         pr_debug("port %hu: received link status notification",
> portnum(p));
> >         transport_rtnl_link_status(p->trp, fd, p->name,
> port_link_status, p);
> >         if (p->link_status == (LINK_UP | LINK_STATE_CHANGED))
> >             return EV_FAULT_CLEARED;
> >         else if ((p->link_status == (LINK_DOWN | LINK_STATE_CHANGED)) ||
> >              (p->link_status & TS_LABEL_CHANGED))
> >             return EV_FAULT_DETECTED;
> >         else
> >             return EV_NONE;
> >
> > raising a EV_FAULT_DETECT on LINK_DOWN
>
> So the SDE gets triggered twice?  Not really a problem.
>
> Thanks,
> Richard
>


-- 
*Luigi 'Comio' Mantellini*
My Professional Profile <http://www.linkedin.com/in/comio>

*"UNIX is very simple, it just needs a genius to understand its
simplicity." [cit.]*
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to