* [PATCH] net/mlx4_en: Update reported link modes for 1/10G
@ 2021-11-28 12:37 Erik Ekman
2021-11-28 13:57 ` Tariq Toukan
2021-11-29 13:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Erik Ekman @ 2021-11-28 12:37 UTC (permalink / raw)
To: Tariq Toukan, David S. Miller, Jakub Kicinski
Cc: Erik Ekman, Michael Stapelberg, netdev, linux-rdma, linux-kernel
When link modes were initially added in commit 2c762679435dc
("net/mlx4_en: Use PTYS register to query ethtool settings") and
later updated for the new ethtool API in commit 3d8f7cc78d0eb
("net: mlx4: use new ETHTOOL_G/SSETTINGS API") the only 1/10G non-baseT
link modes configured were 1000baseKX, 10000baseKX4 and 10000baseKR.
It looks like these got picked to represent other modes since nothing
better was available.
Switch to using more specific link modes added in commit 5711a98221443
("net: ethtool: add support for 1000BaseX and missing 10G link modes").
Tested with MCX311A-XCAT connected via DAC.
Before:
% sudo ethtool enp3s0
Settings for enp3s0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseKX/Full
10000baseKR/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: 1000baseKX/Full
10000baseKR/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Auto-negotiation: off
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000014 (20)
link ifdown
Link detected: yes
With this change:
% sudo ethtool enp3s0
Settings for enp3s0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseX/Full
10000baseCR/Full
10000baseSR/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: 1000baseX/Full
10000baseCR/Full
10000baseSR/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Auto-negotiation: off
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000014 (20)
link ifdown
Link detected: yes
Tested-by: Michael Stapelberg <michael@stapelberg.ch>
Signed-off-by: Erik Ekman <erik@kryo.se>
---
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
index 066d79e4ecfc..10238bedd694 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
@@ -670,7 +670,7 @@ void __init mlx4_en_init_ptys2ethtool_map(void)
MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_1000BASE_T, SPEED_1000,
ETHTOOL_LINK_MODE_1000baseT_Full_BIT);
MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_1000BASE_CX_SGMII, SPEED_1000,
- ETHTOOL_LINK_MODE_1000baseKX_Full_BIT);
+ ETHTOOL_LINK_MODE_1000baseX_Full_BIT);
MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_1000BASE_KX, SPEED_1000,
ETHTOOL_LINK_MODE_1000baseKX_Full_BIT);
MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_10GBASE_T, SPEED_10000,
@@ -682,9 +682,9 @@ void __init mlx4_en_init_ptys2ethtool_map(void)
MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_10GBASE_KR, SPEED_10000,
ETHTOOL_LINK_MODE_10000baseKR_Full_BIT);
MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_10GBASE_CR, SPEED_10000,
- ETHTOOL_LINK_MODE_10000baseKR_Full_BIT);
+ ETHTOOL_LINK_MODE_10000baseCR_Full_BIT);
MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_10GBASE_SR, SPEED_10000,
- ETHTOOL_LINK_MODE_10000baseKR_Full_BIT);
+ ETHTOOL_LINK_MODE_10000baseSR_Full_BIT);
MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_20GBASE_KR2, SPEED_20000,
ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT,
ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT);
--
2.33.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net/mlx4_en: Update reported link modes for 1/10G
2021-11-28 12:37 [PATCH] net/mlx4_en: Update reported link modes for 1/10G Erik Ekman
@ 2021-11-28 13:57 ` Tariq Toukan
2021-11-29 13:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Tariq Toukan @ 2021-11-28 13:57 UTC (permalink / raw)
To: Erik Ekman, David S. Miller, Jakub Kicinski
Cc: Michael Stapelberg, netdev, linux-rdma, linux-kernel
On 11/28/2021 2:37 PM, Erik Ekman wrote:
> When link modes were initially added in commit 2c762679435dc
> ("net/mlx4_en: Use PTYS register to query ethtool settings") and
> later updated for the new ethtool API in commit 3d8f7cc78d0eb
> ("net: mlx4: use new ETHTOOL_G/SSETTINGS API") the only 1/10G non-baseT
> link modes configured were 1000baseKX, 10000baseKX4 and 10000baseKR.
> It looks like these got picked to represent other modes since nothing
> better was available.
>
> Switch to using more specific link modes added in commit 5711a98221443
> ("net: ethtool: add support for 1000BaseX and missing 10G link modes").
>
> Tested with MCX311A-XCAT connected via DAC.
> Before:
>
> % sudo ethtool enp3s0
> Settings for enp3s0:
> Supported ports: [ FIBRE ]
> Supported link modes: 1000baseKX/Full
> 10000baseKR/Full
> Supported pause frame use: Symmetric Receive-only
> Supports auto-negotiation: No
> Supported FEC modes: Not reported
> Advertised link modes: 1000baseKX/Full
> 10000baseKR/Full
> Advertised pause frame use: Symmetric
> Advertised auto-negotiation: No
> Advertised FEC modes: Not reported
> Speed: 10000Mb/s
> Duplex: Full
> Auto-negotiation: off
> Port: Direct Attach Copper
> PHYAD: 0
> Transceiver: internal
> Supports Wake-on: d
> Wake-on: d
> Current message level: 0x00000014 (20)
> link ifdown
> Link detected: yes
>
> With this change:
>
> % sudo ethtool enp3s0
> Settings for enp3s0:
> Supported ports: [ FIBRE ]
> Supported link modes: 1000baseX/Full
> 10000baseCR/Full
> 10000baseSR/Full
> Supported pause frame use: Symmetric Receive-only
> Supports auto-negotiation: No
> Supported FEC modes: Not reported
> Advertised link modes: 1000baseX/Full
> 10000baseCR/Full
> 10000baseSR/Full
> Advertised pause frame use: Symmetric
> Advertised auto-negotiation: No
> Advertised FEC modes: Not reported
> Speed: 10000Mb/s
> Duplex: Full
> Auto-negotiation: off
> Port: Direct Attach Copper
> PHYAD: 0
> Transceiver: internal
> Supports Wake-on: d
> Wake-on: d
> Current message level: 0x00000014 (20)
> link ifdown
> Link detected: yes
>
> Tested-by: Michael Stapelberg <michael@stapelberg.ch>
> Signed-off-by: Erik Ekman <erik@kryo.se>
> ---
> drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> index 066d79e4ecfc..10238bedd694 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> @@ -670,7 +670,7 @@ void __init mlx4_en_init_ptys2ethtool_map(void)
> MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_1000BASE_T, SPEED_1000,
> ETHTOOL_LINK_MODE_1000baseT_Full_BIT);
> MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_1000BASE_CX_SGMII, SPEED_1000,
> - ETHTOOL_LINK_MODE_1000baseKX_Full_BIT);
> + ETHTOOL_LINK_MODE_1000baseX_Full_BIT);
> MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_1000BASE_KX, SPEED_1000,
> ETHTOOL_LINK_MODE_1000baseKX_Full_BIT);
> MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_10GBASE_T, SPEED_10000,
> @@ -682,9 +682,9 @@ void __init mlx4_en_init_ptys2ethtool_map(void)
> MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_10GBASE_KR, SPEED_10000,
> ETHTOOL_LINK_MODE_10000baseKR_Full_BIT);
> MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_10GBASE_CR, SPEED_10000,
> - ETHTOOL_LINK_MODE_10000baseKR_Full_BIT);
> + ETHTOOL_LINK_MODE_10000baseCR_Full_BIT);
> MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_10GBASE_SR, SPEED_10000,
> - ETHTOOL_LINK_MODE_10000baseKR_Full_BIT);
> + ETHTOOL_LINK_MODE_10000baseSR_Full_BIT);
> MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_20GBASE_KR2, SPEED_20000,
> ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT,
> ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT);
>
LGTM. Thanks for your patch.
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/mlx4_en: Update reported link modes for 1/10G
2021-11-28 12:37 [PATCH] net/mlx4_en: Update reported link modes for 1/10G Erik Ekman
2021-11-28 13:57 ` Tariq Toukan
@ 2021-11-29 13:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-29 13:10 UTC (permalink / raw)
To: Erik Ekman; +Cc: tariqt, davem, kuba, michael, netdev, linux-rdma, linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Sun, 28 Nov 2021 13:37:11 +0100 you wrote:
> When link modes were initially added in commit 2c762679435dc
> ("net/mlx4_en: Use PTYS register to query ethtool settings") and
> later updated for the new ethtool API in commit 3d8f7cc78d0eb
> ("net: mlx4: use new ETHTOOL_G/SSETTINGS API") the only 1/10G non-baseT
> link modes configured were 1000baseKX, 10000baseKX4 and 10000baseKR.
> It looks like these got picked to represent other modes since nothing
> better was available.
>
> [...]
Here is the summary with links:
- net/mlx4_en: Update reported link modes for 1/10G
https://git.kernel.org/netdev/net/c/2191b1dfef7d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-29 13:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-28 12:37 [PATCH] net/mlx4_en: Update reported link modes for 1/10G Erik Ekman
2021-11-28 13:57 ` Tariq Toukan
2021-11-29 13:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).