]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net/mlx5: Add HWS as secondary steering mode
authorMoshe Shemesh <moshe@nvidia.com>
Thu, 3 Jul 2025 18:54:31 +0000 (21:54 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Jul 2025 02:12:17 +0000 (19:12 -0700)
Add HW Steering (HWS) as a secondary option for device steering mode. If
the device does not support SW Steering (SWS), HW Steering will be used
as the default, provided it is supported. FW Steering will now be
selected as the default only if both HWS and SWS are unavailable.

Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250703185431.445571-11-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

index a8046200d376d3b99f57b815cefbad14507700b1..f30fc793e1fb860b85d0285f5da6b1db98c2071b 100644 (file)
@@ -3919,6 +3919,8 @@ int mlx5_fs_core_alloc(struct mlx5_core_dev *dev)
 
        if (mlx5_fs_dr_is_supported(dev))
                steering->mode = MLX5_FLOW_STEERING_MODE_SMFS;
+       else if (mlx5_fs_hws_is_supported(dev))
+               steering->mode = MLX5_FLOW_STEERING_MODE_HMFS;
        else
                steering->mode = MLX5_FLOW_STEERING_MODE_DMFS;