On Wed, Apr 26, 2023 at 02:44:27PM +0200, Miroslav Lichvar wrote:
> When the netlink socket of a port (used for receiving link up/down
> events) had an error (e.g. ENOBUFS due to the kernel sending too many
> messages), ptp4l switched the port to the faulty state, but it kept
> getting POLLERR on the socket and logged "port 1: unexpected socket
> error" in an infinite loop.
> 
> Unlike the PTP event and general sockets, the netlink sockets cannot be
> closed in the faulty state as they are needed to receive the link up event.
> 
> Instead, receive and clear the error on all descriptors getting POLLERR
> with getsockopt(SO_ERROR).

Never seen that before.  Learn something new every day...

> Include the error in the log message together
> with the descriptor index to make it easier to debug issues like this in
> future.
> 
> Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>

Applied.

Thanks,
Richard


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to