summaryrefslogtreecommitdiff
path: root/include/linux/mlx5/driver.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2023-01-18 00:01:55 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2023-02-08 03:29:53 +0300
commit7802886274cc850a205e9e334c5a1b1b743ea71c (patch)
tree72e757c5354372361c3e8988663225f9ac301f26 /include/linux/mlx5/driver.h
parent383d9f87a06dd923c4fd0fdcb65b58258851f545 (diff)
downloadlinux-7802886274cc850a205e9e334c5a1b1b743ea71c.tar.xz
mlx5: reduce stack usage in mlx5_setup_tc
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> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'include/linux/mlx5/driver.h')
0 files changed, 0 insertions, 0 deletions