]> git.itanic.dy.fi Git - linux-stable/commit
net/mlx5: DR, Fix 'stack frame size exceeds limit' error in dr_rule
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Sat, 12 Nov 2022 22:04:17 +0000 (00:04 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 10 Jan 2023 06:08:33 +0000 (22:08 -0800)
commit17b3222e943701c408d6e03357967829aaea0550
treeed7446b49ec24321089c9c53dfdb805f955ba89d
parent2ea26b4de6f42b74a5f1701de41efa6bc9f12666
net/mlx5: DR, Fix 'stack frame size exceeds limit' error in dr_rule

If the kernel configuration asks the compiler to check frame limit of 1K,
dr_rule_create_rule_nic exceed this limit:
    "stack frame size (1184) exceeds limit (1024)"

Fixing this issue by checking configured frame limit and using the
optimization STE array only for cases with the usual 2K (or larger)
stack size warning.

Fixes: b9b81e1e9382 ("net/mlx5: DR, For short chains of STEs, avoid allocating ste_arr dynamically")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c