[PATCH] net/mlx5/hws: allow HWS support on non esw-manager devices

Alex Vesker valex at nvidia.com
Thu Nov 3 13:50:00 CET 2022


On context initialization the reparse capability support
for NIC and FDB tables was required for allowing HWS. This
caused a problem for devices that only want to run NIC
steering. Modified the check to require FDB reparse only
for esw-manager.

Fixes: b0290e5 ("net/mlx5/hws: add context object")
Signed-off-by: Alex Vesker <valex at nvidia.com>
Reviewed-by: Erez Shitrit <erezsh at nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_context.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_context.c b/drivers/net/mlx5/hws/mlx5dr_context.c
index ae86694a51..76ada7bb7f 100644
--- a/drivers/net/mlx5/hws/mlx5dr_context.c
+++ b/drivers/net/mlx5/hws/mlx5dr_context.c
@@ -108,7 +108,8 @@ static void mlx5dr_context_check_hws_supp(struct mlx5dr_context *ctx)
 	}
 
 	/* Current solution requires all rules to set reparse bit */
-	if ((!caps->nic_ft.reparse || !caps->fdb_ft.reparse) ||
+	if ((!caps->nic_ft.reparse ||
+	     (!caps->fdb_ft.reparse && caps->eswitch_manager)) ||
 	    !IS_BIT_SET(caps->rtc_reparse_mode, MLX5_IFC_RTC_REPARSE_ALWAYS)) {
 		DR_LOG(INFO, "Required HWS reparse cap not supported");
 		return;
-- 
2.18.1



More information about the dev mailing list