]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:29 +0000 (11:58 +0100)
commit53457ce40b1d816ef7a57843df875ba38b782266
tree303d765307712a16ab78134e74ac8895555227b5
parentdef05d1c95cfa661a0c93fcd97a84a6867776955
net/mlx5e: TC, Keep mod hdr actions after mod hdr alloc

[ Upstream commit f7a4e5847b5252cefff0d6927eaeabdee0ec38b7 ]

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: 558d26605c41 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c