Just like other process_*() that quickly return when the port state
doesn't require to process the incoming message, we can add a test
into process_announce() in order to avoid wasting the cpu.
This is not a special case, the announce messages should be ignored on
Master-only ports and the ports state cannot change.

As side note, In my testing scenario the master-only ports receive
announce messages and when the slave port loses the signal the node
evolves in grand-master flooding the log with "assuming the grand
master role" message. Not a critical issue, of course... but in this
case we lost time with logging and blocking the main loop.

My 2Eurocents.

ciao

luigi

Il giorno mar 4 mag 2021 alle ore 14:02 Richard Cochran
<richardcoch...@gmail.com> ha scritto:
>
> On Mon, May 03, 2021 at 06:52:02PM +0200, Luigi 'Comio' Mantellini wrote:
> > I noticed that the Announce messages received on MasterOnly ports
> > generate a SDE condition in bc_event().
>
> and so what?  What is the problem?
>
> > I think that we can return
> > EV_NONE when the port is a master_only (or we can skip the
> > process_annonce() at all). Is it correct?
>
> No thanks, I don't want special cases sprinkled all over.
>
> Thanks,
> Richard



-- 
Luigi 'Comio' Mantellini
My Professional Profile

"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