Messages in this thread | | | Date | Wed, 18 Jan 2023 08:49:20 +0200 | Subject | Re: [PATCH] [v2] mlx5: reduce stack usage in mlx5_setup_tc | From | Tariq Toukan <> |
| |
On 17/01/2023 23:01, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Clang warns about excessive stack usage on 32-bit targets: > > drivers/net/ethernet/mellanox/mlx5/core/en_main.c:3597:12: error: stack frame size (1184) exceeds limit (1024) in 'mlx5e_setup_tc' [-Werror,-Wframe-larger-than] > static int mlx5e_setup_tc(struct net_device *dev, enum tc_setup_type type, > > It turns out that both the mlx5e_setup_tc_mqprio_dcb() function and > the mlx5e_safe_switch_params() function it calls have a copy of > 'struct mlx5e_params' on the stack, and this structure is fairly > large. > > Use dynamic allocation for the inner one. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > v2: simplify the patch > --- > .../net/ethernet/mellanox/mlx5/core/en_main.c | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) >
Thanks for your patch. Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
| |