On Sat, Aug 05, 2017 at 10:13:07AM +0200, Richard Cochran wrote: > > enum fsm_event port_event(struct port *p, int fd_index) > > @@ -2301,7 +2313,7 @@ enum fsm_event port_event(struct port *p, int > > fd_index) > > case FD_RTNL: > > pr_debug("port %hu: received link status notification", > > portnum(p)); > > rtnl_link_status(fd, port_link_status, p); > > - return port_link_status_get(p) ? EV_FAULT_CLEARED : > > EV_FAULT_DETECTED; > > + return EV_NONE; > > Maybe we can let rtnl_link_status() return the EV_ value from > port_link_status(), in order to keep a functional pattern and avoid > the hidden port_dispatch().
for ( ; NLMSG_OK(nh, len); nh = NLMSG_NEXT(nh, len)) { if (nh->nlmsg_type == RTM_NEWLINK) { cb(ctx, index, info->ifi_flags & IFF_RUNNING ? 1 : 0, device); } } One rtnl msg may have multi messages with nh->nlmsg_type == RTM_NEWLINK, which will call back port_link_status() multi times. So we could not let rtnl_link_status() return EV_ value. Thanks Hangbin ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel