Subject: Re: [net-next 05/14] net/mlx5: DR, Allocate ste_arr on stack instead of dynamically

From: Jakub Kicinski <[email-masked]>
Date: Mon, 24 Oct 2022 21:24:19 -0700

On Mon, 24 Oct 2022 14:57:25 +0100 Saeed Mahameed wrote:
> From: Yevgeny Kliteynik <[email-masked]>
> 
> While creting rule, ste_arr is a short array that is allocated in
> the beginning of the function and freed at the end.
> To avoid memory allocation "hiccups" that sometimes take up to 10ms,
> allocate it on stack.

There's a reason, 32bit x86 does not like this:

drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c: In function ‘dr_rule_create_rule_nic’:
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c:1202:1: warning: the frame size of 1568 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1202 | }
     | ^