]> 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)
commit80461ccf3eb3f5c498094c7aa9dd5b930e0893bf
tree32117ad6096c74cdb884f5cf5976584ee69b1931
parent46d596aac0cbe5507a9b11bc9e99cc698cf4448e
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