Skip to contentSkip to conversation

nfp: ethtool: supplement nfp link modes supported

PATCH Applied Simon Horman 4 participants 5 messages Feb 10, 2023 – Feb 13, 2023

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

PATCH 1/1 nfp: ethtool: supplement nfp link modes supported

From: Yu Xiao <[email protected]>

Add support for the following modes to the nfp driver:

NFP_MEDIA_10GBASE_LR
NFP_MEDIA_25GBASE_LR
NFP_MEDIA_25GBASE_ER

These modes are supported by the hardware and,
support for them was recently added to firmware.

---
 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 12 ++++++++++++
 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h |  3 +++
 2 files changed, 15 insertions(+)
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +12 -0
index 918319f965b3..dfedb52b7e70 100644
@@ -313,6 +313,10 @@ static const struct nfp_eth_media_link_mode {
 		.ethtool_link_mode	= ETHTOOL_LINK_MODE_10000baseKR_Full_BIT,
 		.speed			= NFP_SPEED_10G,
 	},
+	[NFP_MEDIA_10GBASE_LR] = {
+		.ethtool_link_mode	= ETHTOOL_LINK_MODE_10000baseLR_Full_BIT,
+		.speed			= NFP_SPEED_10G,
+	},
 	[NFP_MEDIA_10GBASE_CX4] = {
 		.ethtool_link_mode	= ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT,
 		.speed			= NFP_SPEED_10G,
@@ -349,6 +353,14 @@ static const struct nfp_eth_media_link_mode {
 		.ethtool_link_mode	= ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
 		.speed			= NFP_SPEED_25G,
 	},
+	[NFP_MEDIA_25GBASE_LR] = {
+		.ethtool_link_mode	= ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
+		.speed			= NFP_SPEED_25G,
+	},
+	[NFP_MEDIA_25GBASE_ER] = {
+		.ethtool_link_mode	= ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
+		.speed			= NFP_SPEED_25G,
+	},
 	[NFP_MEDIA_40GBASE_CR4] = {
 		.ethtool_link_mode	= ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT,
 		.speed			= NFP_SPEED_40G,
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h +3 -0
index 8f5cab0032d0..781edc451bd4 100644
@@ -140,6 +140,9 @@ enum nfp_ethtool_link_mode_list {
 	NFP_MEDIA_100GBASE_CR4,
 	NFP_MEDIA_100GBASE_KP4,
 	NFP_MEDIA_100GBASE_CR10,
+	NFP_MEDIA_10GBASE_LR,
+	NFP_MEDIA_25GBASE_LR,
+	NFP_MEDIA_25GBASE_ER,
 	NFP_MEDIA_LINK_MODES_NUMBER
 };
 
Signature · 1 line
2.30.2
#1 lore raw
Quoted 10 lines · Simon Horman

From: Yu Xiao <[email protected]>

Add support for the following modes to the nfp driver:

NFP_MEDIA_10GBASE_LR
NFP_MEDIA_25GBASE_LR
NFP_MEDIA_25GBASE_ER

These modes are supported by the hardware and,
support for them was recently added to firmware.

Is it backward compatible? Will it work if I run old FW?

Thanks

#2 lore raw
Quoted 5 lines · Leon Romanovsky
Quoted 4 lines · Simon Horman

From: Yu Xiao <[email protected]>

Add support for the following modes to the nfp driver:

Quoted 8 lines
Quoted 6 lines

NFP_MEDIA_10GBASE_LR
NFP_MEDIA_25GBASE_LR
NFP_MEDIA_25GBASE_ER

These modes are supported by the hardware and,
support for them was recently added to firmware.

Is it backward compatible? Will it work if I run old FW?

Yes. The new ones are appended, not inserted.

Quoted 2 lines

Thanks

Reviewed-by on v1 1/1
#3 lore raw
In reply to Simon Horman
Quoted 11 lines · Simon Horman

From: Yu Xiao <[email protected]>

Add support for the following modes to the nfp driver:

NFP_MEDIA_10GBASE_LR
NFP_MEDIA_25GBASE_LR
NFP_MEDIA_25GBASE_ER

These modes are supported by the hardware and,
support for them was recently added to firmware.

Quoted 7 lines
---
 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 12 ++++++++++++
 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h |  3 +++
 2 files changed, 15 insertions(+)

Thanks,

#4 lore raw
In reply to Simon Horman
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 9 lines · On Fri, 10 Feb 2023 10:53:19 +0100 you wrote:

From: Yu Xiao <[email protected]>

Add support for the following modes to the nfp driver:

NFP_MEDIA_10GBASE_LR
NFP_MEDIA_25GBASE_LR
NFP_MEDIA_25GBASE_ER

[...]

Here is the summary with links:
- [net-next] nfp: ethtool: supplement nfp link modes supported

    https://git.kernel.org/netdev/net-next/c/170677fee45b

You are awesome, thank you!

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