Re: [Linuxptp-devel] [PATCH 1/8] rtnl: use ifinfomsg instead of rtgenmsg to request link info
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Hangbin L. <liu...@gm...> - 2017-07-04 10:32:37
|
On Tue, Jul 04, 2017 at 11:02:26AM +0200, Richard Cochran wrote: > > 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. Hmm.. If we want to use a single rtnl socket on all ports. we need create it before port_open() and give the fd to the new port. On the other hand, if we use the same socket, 1) events & POLLIN , we have a notify message with port 2 iface index. 2) on port 1, rtnl_link_status(rtnl_fd, port_link_status, p). Then all notify message received. But after check, the if index is not match 3) on port 2, call rtnl_link_status(), but the message on this socket already recieved. Then we will miss the notify. So I think we need to make each port have their own rtnl socket fd. Then each fd get their own multicast rtnl message. What do you think? Thanks Hangbin |