]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: TC, Skip redundant ct clear actions
authorRoi Dayan <roid@nvidia.com>
Thu, 3 Feb 2022 07:42:19 +0000 (09:42 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 24 Feb 2022 00:08:18 +0000 (16:08 -0800)
commitc877573ccba37c8c80d6aa4aef0fc0a05a6fdc74
tree3b32b577bf5fbb0994ca0bb39a6f4b80d6105958
parent2397310bf2cb15a13a5b6ccc51d1eb0de528aec8
net/mlx5e: TC, Skip redundant ct clear actions

Offload of ct clear action is just resetting the reg_c register.
It's done by allocating modify hdr resources which is limited.
Doing it multiple times is redundant and wasting modify hdr resources
and if resources depleted the driver will fail offloading the rule.
Ignore redundant ct clear actions after the first one.

Fixes: 8209ae54d00b ("net/mlx5e: CT, Fix multiple allocations and memleak of mod acts")
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Ariel Levkovich <lariel@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/ct.c