]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net/mlx5: E-Switch, notify SD on eswitch disable
authorShay Drory <shayd@nvidia.com>
Fri, 12 Jun 2026 11:38:57 +0000 (14:38 +0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jun 2026 18:40:50 +0000 (11:40 -0700)
When eswitch is disabled, notify the SD layer so it can clean up
SD-specific resources such as the TX flow table root configuration
on secondary devices.

Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260612113904.537595-9-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

index b531d1c226b0f01198dc3c49f8db8a9e4d6945a5..a0e2ca87b8d8fd5c0b02f00bcb1bbd7eca3d1ede 100644 (file)
@@ -2065,6 +2065,7 @@ void mlx5_eswitch_disable(struct mlx5_eswitch *esw)
        mlx5_esw_reps_unblock(esw);
 
        esw->mode = MLX5_ESWITCH_LEGACY;
+       mlx5_sd_eswitch_mode_set(esw->dev, MLX5_ESWITCH_LEGACY);
        mlx5_lag_enable_change(esw->dev);
 }