On Sat, Aug 12, 2017 at 10:16:20PM +0800, Hangbin Liu wrote: > For example, when the first time we receive a linkup + ts_iface change > message, we need to return EV_FAULT_DETECTED. But as we know, we may > recive multi linkup message. For these kind of message, we need to return > EV_NONE.
Right... > Then after rtnl_link_status(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; > > > What do you think? Looks better to me, but why not place this code at the end of the port_link_status() function? Thanks, Richard ------------------------------------------------------------------------------ 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