From: Ivan Vecera <ivecera@redhat.com>
To: netdev@vger.kernel.org
Cc: Jiri Pirko <jiri@resnulli.us>, Petr Oros <poros@redhat.com>,
David Ahern <dsahern@kernel.org>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH iproute2-next] ip: display DPLL pin information in link details
Date: Mon, 13 Jul 2026 11:21:19 +0200 [thread overview]
Message-ID: <20260713092119.1536385-1-ivecera@redhat.com> (raw)
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
reply other threads:[~2026-07-13 9:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260713092119.1536385-1-ivecera@redhat.com \
--to=ivecera@redhat.com \
--cc=dsahern@kernel.org \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=poros@redhat.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox