[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c3fac862-2f5a-6be8-5be2-19bf5866c067@gmail.com>
Date: Wed, 18 Jan 2023 08:49:20 +0200
From: Tariq Toukan <ttoukan.linux@...il.com>
To: Arnd Bergmann <arnd@...nel.org>,
Saeed Mahameed <saeedm@...dia.com>,
Leon Romanovsky <leon@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>, Tariq Toukan <tariqt@...dia.com>,
Maxim Mikityanskiy <maximmi@...dia.com>,
Gal Pressman <gal@...dia.com>, Lama Kayal <lkayal@...dia.com>,
Moshe Tal <moshet@...dia.com>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH] [v2] mlx5: reduce stack usage in mlx5_setup_tc
On 17/01/2023 23:01, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.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@...db.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@...dia.com>
Powered by blists - more mailing lists