* [PATCH iproute2-next] ip: display DPLL pin information in link details
@ 2026-07-13 9:21 Ivan Vecera
0 siblings, 0 replies; only message in thread
From: Ivan Vecera @ 2026-07-13 9:21 UTC (permalink / raw)
To: netdev; +Cc: Jiri Pirko, Petr Oros, David Ahern, Stephen Hemminger
Parse the IFLA_DPLL_PIN nested attribute and display the associated
DPLL pin ID in 'ip link show' detail output. This allows users to see
which DPLL recovered clock pin is associated with a network interface
without having to cross-reference with 'dpll pin show'.
Example output:
$ ip -d link show eth0
... parentbus pci parentdev 0000:51:00.0 dpll-pin 4
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
ip/ipaddress.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 6017bc8370cb..bf470961182e 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -25,6 +25,7 @@
#include <linux/if_infiniband.h>
#include <linux/sockios.h>
#include <linux/net_namespace.h>
+#include <linux/dpll.h>
#include "rt_names.h"
#include "utils.h"
@@ -1294,6 +1295,18 @@ int print_linkinfo(struct nlmsghdr *n, void *arg)
"parentdev %s ",
rta_getattr_str(tb[IFLA_PARENT_DEV_NAME]));
}
+
+ if (tb[IFLA_DPLL_PIN]) {
+ struct rtattr *dp[DPLL_A_PIN_MAX + 1];
+
+ parse_rtattr_nested(dp, DPLL_A_PIN_MAX,
+ tb[IFLA_DPLL_PIN]);
+ if (dp[DPLL_A_PIN_ID])
+ print_uint(PRINT_ANY,
+ "dpll_pin",
+ "dpll-pin %u ",
+ rta_getattr_u32(dp[DPLL_A_PIN_ID]));
+ }
}
if ((do_link || show_details) && tb[IFLA_IFALIAS]) {
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-13 9:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13 9:21 [PATCH iproute2-next] ip: display DPLL pin information in link details Ivan Vecera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox