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

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