[PATCH net-next v3 10/10] net/mlx5: Add HWS as secondary steering mode

Mark Bloch posted 10 patches 3 months ago
[PATCH net-next v3 10/10] net/mlx5: Add HWS as secondary steering mode
Posted by Mark Bloch 3 months ago
From: Moshe Shemesh <moshe@nvidia.com>

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>
---
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index a8046200d376..f30fc793e1fb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -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;
 
-- 
2.34.1
Re: [PATCH net-next v3 10/10] net/mlx5: Add HWS as secondary steering mode
Posted by Simon Horman 3 months ago
On Thu, Jul 03, 2025 at 09:54:31PM +0300, Mark Bloch wrote:
> From: Moshe Shemesh <moshe@nvidia.com>
> 
> 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>