Skip to contentSkip to conversation

ip: display DPLL pin information in link details

PATCH Applied Ivan Vecera 2 participants 2 messages Jul 13 – Jul 15

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ip: display DPLL pin information in link details

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
---
 ip/ipaddress.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
ip/ipaddress.c +13 -0
index 6017bc8370cb..bf470961182e 100644
@@ -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]) {
Signature · 1 line
2.53.0
#1 lore raw
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Quoted 10 lines · On Mon, 13 Jul 2026 11:21:19 +0200 you wrote:

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

[...]

Here is the summary with links:
- [iproute2-next] ip: display DPLL pin information in link details

    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=20e860c632e3

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html