Re: [Linuxptp-users] Issue when partner machine reboots
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Keller, J. E <jac...@in...> - 2012-05-04 20:39:43
|
> -----Original Message----- > From: Richard Cochran [mailto:ric...@gm...] > Sent: Friday, May 04, 2012 6:06 AM > To: Keller, Jacob E > Cc: lin...@li... > Subject: Re: [Linuxptp-users] Issue when partner machine reboots > > On Thu, May 03, 2012 at 10:37:30PM +0000, Keller, Jacob E wrote: > > I am having an issue when two machines are hooked up for ptp. If one > > side reboots, the other side will never recover. This happens even > > after the port timeout for reseting the fault. I think the reason this > > occurs is because the socket for UDP goes invalid when the interface > > goes down because of the loss of link. Is there a way to solve this so > > that ptp4l would properly re-initialize when coming back? (attempt to > > re-get the entire sockets etc?) > > > > Or is this just an invalid usecase and I should expect to have to > > reset the daemon if its partners go down? > > I am aware of the problem with a link down. Once the link does down, the UDP > socket is no longer valid. I don't really understand why that should be the > case, but probably we will just have to live with it. > > I think the solution will be to open an additional netlink socket and poll for > the link events. Link down should trigger a port fault, and then the port > reset will then re-open the socket. > > But that will take some time. > > Thanks, > Richard Ok. For now I had validation try using the l2 ethernet packets. Reset doesn't make these invalid. I believe the reason why UDP sockets go down is because the IP address becomes invalid when the socket loses link. (Even if the same IP address came back!) I like the idea of a netlink socket that could trigger a proper port reset. Right now the default port reset doesn't appear to reset the socket. (It does get a fault because it is unable to transmit,but the socket isn't reset when it clears the fault.) |