net/mlx5/hws: fix crash with maximum action combination

When the maximum action combination in RX is used we can get
a segfault due to an incorrect 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: f8c8a6d844 ("net/mlx5/hws: add action object")

Signed-off-by: Alex Vesker <valex@nvidia.com>
Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
This commit is contained in:
Alex Vesker 2022-11-07 12:18:24 +02:00 committed by Raslan Darawsheh
parent e280f92408
commit da81066192

View File

@ -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,