[Linuxptp-devel] Forwarding management messages to UDS port
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
|
From: Miroslav L. <mli...@re...> - 2017-12-06 13:43:48
|
There is an issue with ptp4l printing error messages when forwarding a
management message to the UDS port failed.
ptp4l[1890519.458]: uds: sendto failed: No such file or directory
ptp4l[1890519.458]: uds port: management forward failed
This happens when a client (e.g. pmc) used the port, but it's no
longer listening on its address, and something on the network is
sending management messages which ptp4l tries to forward to all ports.
I guess one option would be to downgrade the messages to debug
messages.
A better option might be to forward only responses to the UDS port. We
don't expect a PTP clock to be listening there, right? I was thinking
something like this:
--- a/clock.c
+++ b/clock.c
@@ -1265,7 +1266,8 @@ static void clock_forward_mgmt_msg(struct clock *c, struct port *p, struct ptp_m
pr_err("port %d: management forward failed",
port_number(piter));
}
- if (clock_do_forward_mgmt(c, p, c->uds_port, msg, &msg_ready))
+ if (management_action(msg) == RESPONSE &&
+ clock_do_forward_mgmt(c, p, c->uds_port, msg, &msg_ready))
pr_err("uds port: management forward failed");
if (msg_ready) {
msg_post_recv(msg, pdulen);
Does it make sense?
--
Miroslav Lichvar
|