net/mlx5: CT: Allow static allocation of mod headers
authorPaul Blakey <paulb@nvidia.com>
Wed, 25 Aug 2021 13:46:41 +0000 (16:46 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 17 Nov 2021 04:31:48 +0000 (20:31 -0800)
commit1cfd3490f2780edb3f1b2f3f64c5c80c67c64075
tree32117ad6096c74cdb884f5cf5976584ee69b1931
parent2c0e5cf5206ecd5da3c6bc5799671c2172713d71
net/mlx5: CT: Allow static allocation of mod headers

As each CT rule uses at least 4 modify header actions, each rule
causes at least 3 reallocations by the mod header actions api.

Allow initial static allocation of the mod acts array, and use it for
CT rules. If the static allocation is exceeded go back to dynamic
allocation.

Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Paul Blakey <paulb@nvidia.com>
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/mod_hdr.c
drivers/net/ethernet/mellanox/mlx5/core/en/mod_hdr.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c