On Tue, Jul 04, 2017 at 04:32:49PM +0800, Hangbin Liu wrote:
> But for link status monitor, ifinfomsg.ifi_index doesn't do any help. We still
> need to register with groupp RTNLGRP_LINK and keep receive all interfaces'
> information.
I see.
> Back to this question, do you still want to move rtnl socket from clock to
> per port?
Yes, but only if we can use a single rtnl socket for both messages.
> I think we can filter the call back if index to make sure we get correct
> interface, something like
>
> +static void port_link_status(void *ctx, int index, int linkup)
> +{
> + struct port *p = ctx;
> +
> + if (index != if_nametoindex(p->name) && p->link_status != linkup)
> + return;
> +
> + p->link_status = linkup;
> + pr_notice("port %hu: link %s", portnum(p), linkup ? "up" : "down");
> +
> + if (linkup)
> + port_dispatch(p, EV_FAULT_CLEARED, 0);
> + else
> + port_dispatch(p, EV_FAULT_DETECTED, 0);
> +}
Sounds reasonable.
> But this should have no relation with the failover patch set.
Right, and so I would like to see that change first.
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel