net/mlx5e: TC, Keep mod hdr actions after mod hdr alloc
authorAriel Levkovich <lariel@nvidia.com>
Mon, 29 Aug 2022 21:32:30 +0000 (00:32 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 10 Jan 2023 06:08:33 +0000 (22:08 -0800)
commit5e72f3f1c558019082cfeedeed73748f35d780c6
tree2e02bb5a99a5b58e56e5bd7f26661c2e5a07cfc9
parente0bf81bf0d3d4747c146e0bf44774d3d881d7137
net/mlx5e: TC, Keep mod hdr actions after mod hdr alloc

When offloading TC NIC rule which has mod_hdr action, the
mod_hdr actions list is freed upon mod_hdr allocation.

In the new format of handling multi table actions and CT in
particular, the mod_hdr actions list is still relevant when
setting the pre and post rules and therefore, freeing the list
may cause adding rules which don't set the FTE_ID.

Therefore, the mod_hdr actions list needs to be kept for the
pre/post flows as well and should be left for these handler to
be freed.

Fixes: 8300f225268b ("net/mlx5e: Create new flow attr for multi table actions")
Signed-off-by: Ariel Levkovich <lariel@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c