mlx5 misc fixes 2025-03-18
Subsystems (4)
Tariq Toukan
maintainercover mlx5 misc fixes 2025-03-18
Hi,
This small patchset provides misc bug fixes to the mlx5 core driver.
Thanks,
Tariq.
Mark Bloch (1):
net/mlx5: LAG, reload representors on LAG creation failure
Moshe Shemesh (1):
net/mlx5: Start health poll after enable hca
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 15 +++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-)
base-commit: daa624d3c2ddffdcbad140a9625a4064371db44f
Signature · 1 line
2.31.1
Tariq Toukan
maintainerPATCH 1/2 net/mlx5: LAG, reload representors on LAG creation failure
From: Mark Bloch <[email protected]>
When LAG creation fails, the driver reloads the RDMA devices. If RDMA representors are present, they should also be reloaded. This step was missed in the cited commit.
--- drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c +4 -0
@@ -1052,6 +1052,10 @@ static void mlx5_do_bond(struct mlx5_lag *ldev)if (err) {if (shared_fdb || roce_lag)mlx5_lag_add_devices (ldev); +if (shared_fdb) { +mlx5_ldev_for_each (i,0 , ldev) +mlx5_eswitch_reload_ib_reps (ldev->pf[i].dev->priv.eswitch); + }return ; }else if (roce_lag) {
Signature · 1 line
2.31.1
Re: [PATCH net 1/2] net/mlx5: LAG, reload representors on LAG creation failure
Quoted 20 lines · Tariq Toukan
From: Mark Bloch <[email protected]>
When LAG creation fails, the driver reloads the RDMA devices. If RDMA representors are present, they should also be reloaded. This step was missed in the cited commit.
Fixes 598fe77df855 ("net/mlx5: Lag, Create shared FDB when in switchdev mode")Signed-off-by Mark Bloch <[email protected]>Reviewed-by Shay Drori <[email protected]>Signed-off-by Tariq Toukan <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c +0
-0
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c static void mlx5_do_bond(struct mlx5_lag *ldev) · line 1061
Quoted 10 lines
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c +4
-0@@ -1052,6 +1052,10 @@ static void mlx5_do_bond(struct mlx5_lag *ldev)if (err) {if (shared_fdb || roce_lag)mlx5_lag_add_devices (ldev); +if (shared_fdb) { +mlx5_ldev_for_each (i,0 , ldev) +mlx5_eswitch_reload_ib_reps (ldev->pf[i].dev->priv.eswitch); + }return ; }else if (roce_lag) {
Quoted 1 line
2.31.1
Re: [PATCH net 1/2] net/mlx5: LAG, reload representors on LAG creation failure
In reply to Tariq ToukanQuoted 11 lines · Tariq Toukan
From: Mark Bloch <[email protected]>
When LAG creation fails, the driver reloads the RDMA devices. If RDMA representors are present, they should also be reloaded. This step was missed in the cited commit.
Fixes 598fe77df855 ("net/mlx5: Lag, Create shared FDB when in switchdev mode")Signed-off-by Mark Bloch <[email protected]>Reviewed-by Shay Drori <[email protected]>Signed-off-by Tariq Toukan <[email protected]>
Signature · 2 lines
Regards, Kalesh AP
Tariq Toukan
maintainerPATCH 2/2 net/mlx5: Start health poll after enable hca
In reply to Tariq ToukanFrom: Moshe Shemesh <[email protected]>
The health poll mechanism performs periodic checks to detect firmware errors. One of the checks verifies the function is still enabled on firmware side, but the function is enabled only after enable_hca command completed. Start health poll after enable_hca command to avoid a race between function enabled and first health polling.
--- drivers/net/ethernet/mellanox/mlx5/core/main.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/main.c +7 -8
@@ -1205,24 +1205,24 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou dev->caps.embedded_cpu =mlx5_read_embedded_cpu (dev);mlx5_cmd_set_state (dev,MLX5_CMDIF_STATE_UP ); -mlx5_start_health_poll (dev); - err =mlx5_core_enable_hca (dev,0 );if (err) {mlx5_core_err (dev,"enable hca failed\n" ); - goto stop_health_poll; + goto err_cmd_cleanup; } +mlx5_start_health_poll (dev); + err =mlx5_core_set_issi (dev);if (err) {mlx5_core_err (dev,"failed to set issi\n" ); - goto err_disable_hca; + goto stop_health_poll; } err =mlx5_satisfy_startup_pages (dev,1 );if (err) {mlx5_core_err (dev,"failed to allocate boot pages\n" ); - goto err_disable_hca; + goto stop_health_poll; } err =mlx5_tout_query_dtor (dev);
@@ -1235,10 +1235,9 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou reclaim_boot_pages:mlx5_reclaim_startup_pages (dev); -err_disable_hca: -mlx5_core_disable_hca (dev,0 ); stop_health_poll:mlx5_stop_health_poll (dev, boot); +mlx5_core_disable_hca (dev,0 ); err_cmd_cleanup:mlx5_cmd_set_state (dev,MLX5_CMDIF_STATE_DOWN );mlx5_cmd_disable (dev);
@@ -1249,8 +1248,8 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeoustatic void mlx5_function_disable (struct mlx5_core_dev *dev,bool boot) {mlx5_reclaim_startup_pages (dev); -mlx5_core_disable_hca (dev,0 );mlx5_stop_health_poll (dev, boot); +mlx5_core_disable_hca (dev,0 );mlx5_cmd_set_state (dev,MLX5_CMDIF_STATE_DOWN );mlx5_cmd_disable (dev); }
Signature · 1 line
2.31.1
Re: [PATCH net 2/2] net/mlx5: Start health poll after enable hca
Quoted 63 lines · Tariq Toukan
From: Moshe Shemesh <[email protected]>
The health poll mechanism performs periodic checks to detect firmware errors. One of the checks verifies the function is still enabled on firmware side, but the function is enabled only after
enable_hcacommand completed. Start health poll afterenable_hcacommand to avoid a race between function enabled and first health polling.Fixes 9b98d395b85d ("net/mlx5: Start health poll at earlier stage of driver load")Signed-off-by Moshe Shemesh <[email protected]>Reviewed-by Shay Drori <[email protected]>Signed-off-by Tariq Toukan <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/main.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/main.c +6
-7@@ -1205,24 +1205,24 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou dev->caps.embedded_cpu =mlx5_read_embedded_cpu (dev);mlx5_cmd_set_state (dev,MLX5_CMDIF_STATE_UP ); -mlx5_start_health_poll (dev); - err =mlx5_core_enable_hca (dev,0 );if (err) {mlx5_core_err (dev,"enable hca failed\n" ); - goto stop_health_poll; + goto err_cmd_cleanup; } +mlx5_start_health_poll (dev); + err =mlx5_core_set_issi (dev);if (err) {mlx5_core_err (dev,"failed to set issi\n" ); - goto err_disable_hca; + goto stop_health_poll; } err =mlx5_satisfy_startup_pages (dev,1 );if (err) {mlx5_core_err (dev,"failed to allocate boot pages\n" ); - goto err_disable_hca; + goto stop_health_poll; } err =mlx5_tout_query_dtor (dev);@@ -1235,10 +1235,9 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou reclaim_boot_pages:mlx5_reclaim_startup_pages (dev); -err_disable_hca: -mlx5_core_disable_hca (dev,0 ); stop_health_poll:mlx5_stop_health_poll (dev, boot); +mlx5_core_disable_hca (dev,0 ); err_cmd_cleanup:mlx5_cmd_set_state (dev,MLX5_CMDIF_STATE_DOWN );mlx5_cmd_disable (dev);
drivers/net/ethernet/mellanox/mlx5/core/main.c static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou · line 1255
Quoted 9 lines
drivers/net/ethernet/mellanox/mlx5/core/main.c +1
-1@@ -1249,8 +1248,8 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeoustatic void mlx5_function_disable (struct mlx5_core_dev *dev,bool boot) {mlx5_reclaim_startup_pages (dev); -mlx5_core_disable_hca (dev,0 );mlx5_stop_health_poll (dev, boot); +mlx5_core_disable_hca (dev,0 );mlx5_cmd_set_state (dev,MLX5_CMDIF_STATE_DOWN );mlx5_cmd_disable (dev); }
Quoted 2 lines
Signature · 1 line
2.31.1
Re: [PATCH net 2/2] net/mlx5: Start health poll after enable hca
In reply to Tariq ToukanQuoted 9 lines · Tariq Toukan
From: Moshe Shemesh <[email protected]>
The health poll mechanism performs periodic checks to detect firmware errors. One of the checks verifies the function is still enabled on firmware side, but the function is enabled only after
enable_hcacommand completed. Start health poll afterenable_hcacommand to avoid a race between function enabled and first health polling.
Quoted 4 lines
Fixes 9b98d395b85d ("net/mlx5: Start health poll at earlier stage of driver load")Signed-off-by Moshe Shemesh <[email protected]>Reviewed-by Shay Drori <[email protected]>Signed-off-by Tariq Toukan <[email protected]>
Signature · 2 lines
Regards, Kalesh AP
This series was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 18 Mar 2025 22:51:15 +0200 you wrote:
Hi,
This small patchset provides misc bug fixes to the mlx5 core driver.
Thanks,
Tariq.[...]
Here is the summary with links:
- [net,1/2] net/mlx5: LAG, reload representors on LAG creation failure
https://git.kernel.org/netdev/net/c/bdf549a7a4d7 - [net,2/2] net/mlx5: Start health poll after enable hca https://git.kernel.org/netdev/net/c/1726ad035cb0
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html