From: Erez Shitrit <ere...@nvidia.com>

When creating action from type MLX5DR_ACTION_TYP_REFORMAT_TNL_L3_TO_L2
we use modify-header object, we support few of that type at the same
time over this action depends on the number of headers.
Now when destroying the modify-header object we run over the
number_of_patterns, this variable was not set in the creation of that
action.

Fixes: 3a6c50215c07 ("net/mlx5/hws: support multi-pattern")
Cc: va...@nvidia.com
Cc: sta...@dpdk.org

Signed-off-by: Erez Shitrit <ere...@nvidia.com>
Acked-by: Matan Azrad <ma...@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_action.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c 
b/drivers/net/mlx5/hws/mlx5dr_action.c
index 03c3683f71..b90f18df8a 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -1820,6 +1820,7 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action 
*action,
 
                action[i].modify_header.max_num_of_actions = num_of_actions;
                action[i].modify_header.num_of_actions = num_of_actions;
+               action[i].modify_header.num_of_patterns = num_of_hdrs;
                action[i].modify_header.arg_obj = arg_obj;
                action[i].modify_header.pat_obj = pat_obj;
                action[i].modify_header.require_reparse =
-- 
2.39.3

Reply via email to