lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260118-sfp-25g-lr-v1-1-2daf48ffae7f@solid-run.com>
Date: Sun, 18 Jan 2026 16:07:37 +0200
From: Josua Mayer <josua@...id-run.com>
To: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
 Russell King <linux@...linux.org.uk>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Simon Horman <horms@...nel.org>
Cc: Mikhail Anikin <mikhail.anikin@...id-run.com>,
 Rabeeh Khoury <rabeeh@...id-run.com>,
 Yazan Shhady <yazan.shhady@...id-run.com>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, Josua Mayer <josua@...id-run.com>
Subject: [PATCH 1/2] net: ethtool: Add link mode for 25Gbps long-range
 fiber

ethtool.h header already has a link-mode bit for short-range (SR) fiber.
but missing the long-range (LR) variant.

Define link-mode bit for 25Gbps long-range fiber (25000baseLR_Full).

Signed-off-by: Josua Mayer <josua@...id-run.com>
---
 drivers/net/phy/phy-core.c   | 2 +-
 include/uapi/linux/ethtool.h | 1 +
 net/ethtool/common.c         | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c
index 3badf6e84554..cccd1316e145 100644
--- a/drivers/net/phy/phy-core.c
+++ b/drivers/net/phy/phy-core.c
@@ -18,7 +18,7 @@
  */
 const char *phy_speed_to_str(int speed)
 {
-	BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 125,
+	BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 126,
 		"Enum ethtool_link_mode_bit_indices and phylib are out of sync. "
 		"If a speed or mode has been added please update phy_speed_to_str "
 		"and the PHY settings array.\n");
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index ce9aeb65a8e1..51929f3e00d9 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -2094,6 +2094,7 @@ enum ethtool_link_mode_bit_indices {
 	ETHTOOL_LINK_MODE_1600000baseKR8_Full_BIT	 = 122,
 	ETHTOOL_LINK_MODE_1600000baseDR8_Full_BIT	 = 123,
 	ETHTOOL_LINK_MODE_1600000baseDR8_2_Full_BIT	 = 124,
+	ETHTOOL_LINK_MODE_25000baseLR_Full_BIT		 = 125,
 
 	/* must be last entry */
 	__ETHTOOL_LINK_MODE_MASK_NBITS
diff --git a/net/ethtool/common.c b/net/ethtool/common.c
index 4036561b078b..0010debce4e6 100644
--- a/net/ethtool/common.c
+++ b/net/ethtool/common.c
@@ -237,6 +237,7 @@ const char link_mode_names[][ETH_GSTRING_LEN] = {
 	__DEFINE_LINK_MODE_NAME(1600000, KR8, Full),
 	__DEFINE_LINK_MODE_NAME(1600000, DR8, Full),
 	__DEFINE_LINK_MODE_NAME(1600000, DR8_2, Full),
+	__DEFINE_LINK_MODE_NAME(25000, LR, Full),
 };
 static_assert(ARRAY_SIZE(link_mode_names) == __ETHTOOL_LINK_MODE_MASK_NBITS);
 
@@ -464,6 +465,7 @@ const struct link_mode_info link_mode_params[] = {
 	__DEFINE_LINK_MODE_PARAMS(1600000, KR8, Full, K),
 	__DEFINE_LINK_MODE_PARAMS(1600000, DR8, Full, D),
 	__DEFINE_LINK_MODE_PARAMS(1600000, DR8_2, Full, D),
+	__DEFINE_LINK_MODE_PARAMS(25000, LR, Full, L),
 };
 static_assert(ARRAY_SIZE(link_mode_params) == __ETHTOOL_LINK_MODE_MASK_NBITS);
 EXPORT_SYMBOL_GPL(link_mode_params);

-- 
2.43.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ