Skip to contentSkip to conversation

net/mlx5: fix the HWS registers initialization

PATCH In review Bing Zhao 2 participants 2 messages Feb 27, 2024 – Feb 28, 2024 Network drivers

lore
Share & tools
lore

Bing Zhao

author
#0 lore raw

PATCH 1/1 net/mlx5: fix the HWS registers initialization

The method to initialize tag registers by using capability bits is not supported on some old NICs. In the meanwhile, the HWS for flow rule insertion is not supported either. There is no need to initialize HWS only resource on the old NICs.

Fixes 48041ccbaa8d ("net/mlx5: initialize HWS flow registers in shared context")
---
 drivers/net/mlx5/mlx5.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/mlx5/mlx5.c +2 -1
index 881c42a97a..9903efbe53 100644
@@ -1690,7 +1690,8 @@ mlx5_init_shared_dev_registers(struct mlx5_dev_ctx_shared *sh)
 	} else {
 		DRV_LOG(DEBUG, "ASO register: NONE");
 	}
-	mlx5_init_hws_flow_tags_registers(sh);
+	if (sh->config.dv_flow_en == 2)
+		mlx5_init_hws_flow_tags_registers(sh);
 }
 
 static struct mlx5_physical_device *
Signature · 1 line
2.39.3
#1 lore raw

Hi

Quoted 16 lines

-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Tuesday, February 27, 2024 5:26 PM
To: [email protected]; Suanming Mou <[email protected]>; Raslan Darawsheh <[email protected]>
Cc: Ori Kam <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; Dariusz Sosnowski <[email protected]>; Gregory Etelson <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: fix the HWS registers initialization

The method to initialize tag registers by using capability bits is not supported on some old NICs. In the meanwhile, the HWS for flow rule insertion is not supported either. There is no need to initialize HWS only resource on the old NICs.

Quoted 7 lines
Fixes 48041ccbaa8d ("net/mlx5: initialize HWS flow registers in shared

context")
Cc: [email protected]
Cc: [email protected]

Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh