Blame SOURCES/0040-netlink-settings-Expose-the-number-of-lanes-in-use.patch

7e9df8
From 53e33fe5f4f982afe13e45677d134eb1b11d4d2a Mon Sep 17 00:00:00 2001
7e9df8
From: Danielle Ratson <danieller@nvidia.com>
7e9df8
Date: Wed, 10 Feb 2021 15:48:38 +0200
7e9df8
Subject: [PATCH 40/42] netlink: settings: Expose the number of lanes in use
7e9df8
7e9df8
Currently, the user does not have the information regarding how many lanes
7e9df8
are used when the link is up.
7e9df8
7e9df8
After adding a possibility to advertise or force a specific number of
7e9df8
lanes this information becomes helpful.
7e9df8
7e9df8
Expose the number of lanes in use if the information is passed from
7e9df8
kernel.
7e9df8
7e9df8
Signed-off-by: Danielle Ratson <danieller@nvidia.com>
7e9df8
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
7e9df8
(cherry picked from commit db7d457e49833d8a68be03d48cffa1d617498adc)
7e9df8
---
7e9df8
 netlink/settings.c | 6 ++++++
7e9df8
 1 file changed, 6 insertions(+)
7e9df8
7e9df8
diff --git a/netlink/settings.c b/netlink/settings.c
7e9df8
index 37222db5c833..2835805667d2 100644
7e9df8
--- a/netlink/settings.c
7e9df8
+++ b/netlink/settings.c
7e9df8
@@ -471,6 +471,12 @@ int linkmodes_reply_cb(const struct nlmsghdr *nlhdr, void *data)
7e9df8
 		else
7e9df8
 			printf("\tSpeed: %uMb/s\n", val);
7e9df8
 	}
7e9df8
+	if (tb[ETHTOOL_A_LINKMODES_LANES]) {
7e9df8
+		uint32_t val = mnl_attr_get_u32(tb[ETHTOOL_A_LINKMODES_LANES]);
7e9df8
+
7e9df8
+		print_banner(nlctx);
7e9df8
+		printf("\tLanes: %u\n", val);
7e9df8
+	}
7e9df8
 	if (tb[ETHTOOL_A_LINKMODES_DUPLEX]) {
7e9df8
 		uint8_t val = mnl_attr_get_u8(tb[ETHTOOL_A_LINKMODES_DUPLEX]);
7e9df8
 
7e9df8
-- 
7e9df8
2.31.1
7e9df8