Skip to contentSkip to conversation

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

PATCH New Alex Vesker 2 participants 3 messages Nov 3, 2022 – Nov 8, 2022 Network drivers

lore
Share & tools
lore
#0 lore raw

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

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")
---
 drivers/net/mlx5/hws/mlx5dr_context.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/mlx5/hws/mlx5dr_context.c +2 -1
index ae86694a51..76ada7bb7f 100644
@@ -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;
Signature · 1 line
2.18.1
#1 lore raw

PATCH v2 1/1 net/mlx5/hws: fix capability check to allow HWS on non esw-mngr

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 and are not the esw-manager fow which FDB reparse is disabled. Modified the check to require FDB reparse only for esw-manager.

Fixes b0290e5 ("net/mlx5/hws: add context object")
---
 drivers/net/mlx5/hws/mlx5dr_context.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/mlx5/hws/mlx5dr_context.c +2 -1
index ae86694a51..76ada7bb7f 100644
@@ -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;
Signature · 1 line
2.18.1
#2 lore raw

RE: [PATCH v2] net/mlx5/hws: fix capability check to allow HWS on non esw-mngr

Hi,

Quoted 11 lines

-----Original Message-----
From: Alex Vesker <[email protected]>
Sent: Monday, November 7, 2022 1:07 PM
To: Alex Vesker <[email protected]>; Slava Ovsiienko <[email protected]>; NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>; Suanming Mou <[email protected]>; Matan Azrad <[email protected]>
Cc: [email protected]; Ori Kam <[email protected]>
Subject: [PATCH v2] net/mlx5/hws: fix capability check to allow HWS on non esw-mngr

changed commit title a bit,

Quoted 8 lines

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 and are not the esw-manager fow which FDB reparse is disabled. Modified the check to require FDB reparse only for esw-manager.

Fixes b0290e5 ("net/mlx5/hws: add context object")

added missing empty line

Quoted 3 lines

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh