Skip to contentSkip to conversation

net/mlx5/hws: fix possible action setter segmenation fault

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5/hws: fix possible action setter segmenation fault

When the maximum action combination in RX is used we can get a segfault due to an incorrecrt max array size define. This bug can happen on RX/TX or FDB in the most complex cases.
Current max was set to 7, but actual max is:
Max TX: 8, Max RX: 10, Max FDB: 9

Fixes f8c8a6d ("net/mlx5/hws: add action object")
---
 drivers/net/mlx5/hws/mlx5dr_action.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/hws/mlx5dr_action.h +1 -1
index f14d91f994..808f44a740 100644
@@ -6,7 +6,7 @@
 #define MLX5DR_ACTION_H_
 
 /* Max number of STEs needed for a rule (including match) */
-#define MLX5DR_ACTION_MAX_STE 7
+#define MLX5DR_ACTION_MAX_STE 10
 
 enum mlx5dr_action_stc_idx {
 	MLX5DR_ACTION_STC_IDX_CTRL = 0,
Signature · 1 line
2.18.1
#1 lore raw

PATCH 1/1 net/mlx5/hws: fix possible action setter segmenation fault

When the maximum action combination in RX is used we can get a segfault due to an incorrecrt max array size define. This bug can happen on RX/TX or FDB in the most complex cases.
Current max was set to 7, but actual max is:
Max TX: 8, Max RX: 10, Max FDB: 9

Fixes f8c8a6d ("net/mlx5/hws: add action object")
---
 drivers/net/mlx5/hws/mlx5dr_action.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/hws/mlx5dr_action.h +1 -1
index 3b31ffc90e..9a4827481a 100644
@@ -6,7 +6,7 @@
 #define MLX5DR_ACTION_H_
 
 /* Max number of STEs needed for a rule (including match) */
-#define MLX5DR_ACTION_MAX_STE 7
+#define MLX5DR_ACTION_MAX_STE 10
 
 enum mlx5dr_action_stc_idx {
 	MLX5DR_ACTION_STC_IDX_CTRL = 0,
Signature · 1 line
2.18.1
#2 lore raw

PATCH v2 1/1 net/mlx5/hws: fix possible action setter segmenation fault

In reply to Alex Vesker

When the maximum action combination in RX is used we can get a segfault due to an incorrecrt max array size define. This bug can happen on RX/TX or FDB in the most complex cases.
Current max was set to 7, but actual max is:
Max TX: 8, Max RX: 10, Max FDB: 9

Fixes f8c8a6d ("net/mlx5/hws: add action object")
---
 drivers/net/mlx5/hws/mlx5dr_action.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/hws/mlx5dr_action.h +1 -1
index 3b31ffc90e..9a4827481a 100644
@@ -6,7 +6,7 @@
 #define MLX5DR_ACTION_H_
 
 /* Max number of STEs needed for a rule (including match) */
-#define MLX5DR_ACTION_MAX_STE 7
+#define MLX5DR_ACTION_MAX_STE 10
 
 enum mlx5dr_action_stc_idx {
 	MLX5DR_ACTION_STC_IDX_CTRL = 0,
Signature · 1 line
2.18.1
#3 lore raw

Hi,

Quoted 11 lines

-----Original Message-----
From: Alex Vesker <[email protected]>
Sent: Monday, November 7, 2022 12:18 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 possible action setter segmenation fault

Quoted 7 lines

When the maximum action combination in RX is used we can get a segfault due to an incorrecrt max array size define.
This bug can happen on RX/TX or FDB in the most complex cases. Current max was set to 7, but actual max is:
Max TX: 8, Max RX: 10, Max FDB: 9

Fixes f8c8a6d ("net/mlx5/hws: add action object")

missing empty line - will handle during integration

Quoted 3 lines

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh