On 28/01/2021 10:30, Cliff Spradlin via Linuxptp-devel wrote:
Previously, only the logical port number was emitted for most
port-related log messages. Now, the interface name is included.
old: port 12: assuming the grand master role
new: port 12 (eth8): assuming the grand master role
Signed-off-by: Cliff Spradlin <csprad...@google.com>
Change-Id: Id43b82aad3c30c93aea233a1e76f9a8196e25b71
Signed-off-by: Cliff Spradlin <csprad...@google.com>
---
clock.c | 22 +++----
e2e_tc.c | 10 +--
p2p_tc.c | 10 +--
port.c | 158 +++++++++++++++++++++++-----------------------
port_signaling.c | 2 +-
tc.c | 24 +++----
unicast_client.c | 42 ++++++------
unicast_service.c | 2 +-
8 files changed, 135 insertions(+), 135 deletions(-)
diff --git a/clock.c b/clock.c
index 08c61eb..a34737a 100644
--- a/clock.c
+++ b/clock.c
@@ -296,19 +296,19 @@ static int clock_fault_timeout(struct port *port, int set)
struct fault_interval i;
if (!set) {
- pr_debug("clearing fault on port %d", port_number(port));
+ pr_debug("clearing fault on %s", port_log_name(port));
return port_set_fault_timer_lin(port, 0);
}
fault_interval(port, last_fault_type(port), &i);
if (i.type == FTMO_LINEAR_SECONDS) {
- pr_debug("waiting %d seconds to clear fault on port %d",
- i.val, port_number(port));
+ pr_debug("waiting %d seconds to clear fault on %s",
+ i.val, port_log_name(port));
I've being thinking - shouldn't be implemented as new api, like
port_pr_xx(port, ...)?
(similar to kernel dev_xx(dev)).
return port_set_fault_timer_lin(port, i.val);
} else if (i.type == FTMO_LOG2_SECONDS) {
- pr_debug("waiting 2^{%d} seconds to clear fault on port %d",
- i.val, port_number(port));
+ pr_debug("waiting 2^{%d} seconds to clear fault on %s",
+ i.val, port_log_name(port));
return port_set_fault_timer_log(port, 1, i.val);
}
[...]
index 6aaf572..2f8e821 100644
--- a/e2e_tc.c
+++ b/e2e_tc.c
@@ -83,7 +83,7 @@ enum fsm_event e2e_event(struct port *p, int fd_index)
switch (fd_index) {
case FD_ANNOUNCE_TIMER:
case FD_SYNC_RX_TIMER:
- pr_debug("port %hu: %s timeout", portnum(p),
+ pr_debug("%s: %s timeout", p->log_name,
Why in some places it's port_log_name() and in other p->log_name?
fd_index == FD_SYNC_RX_TIMER ? "rx sync" : "announce");
if (p->best) {
fc_clear(p->best);
[...]
--
Best regards,
grygorii
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel