]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit28f233a4588b64e6b34a0279f0d7c970a4b0d214
tree32117ad6096c74cdb884f5cf5976584ee69b1931
parent75a31cb0644e4c1fb0d77f056be69346d6bda852
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