On Tue, 2018-09-18 at 18:07 -0700, Richard Cochran wrote:
> On Tue, Sep 18, 2018 at 11:21:55PM +0000, Patel, Vedang wrote:
> > 
> > Is there any particular reason you removed this? This is needed to
> > process the FD_SYNC_RX_TIMER expiration when the master disconnects
> > unexpectedly.
> AFAICT there is no point in handling that timer in any special way.
> After all, there is nothing for the slave to do.
> 
Yeah there is no action required. 

Since, we are not processing this event, poll() always returns this
event resulting in following being continuously printed:

ptp4l[182621.542]: selected local clock 001b21.fffe.decf15 as best
master

An easy way to reproduce this is to start ptp4l with automotive profile
on 2 systems and then killing off the master.

Following diff fixes the issue. The issue here is, we will be clearing
it out twice when we are other profiles. Thoughts?

Thanks,
Vedang
--
diff --git a/port.c b/port.c
index 2ee463ddbf7e..a88b0d26f363 100644
--- a/port.c
+++ b/port.c
@@ -2485,6 +2485,7 @@ static enum fsm_event bc_event(struct port *p,
int fd_index)
                if (p->best) {
                        fc_clear(p->best);
                }
+               port_clr_tmo(p->fda.fd[FD_SYNC_RX_TIMER]);
                if (p->inhibit_announce) {
                        port_clr_tmo(p->fda.fd[FD_ANNOUNCE_TIMER]);
                } else {
> Thanks,
> Richard
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to