public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] net/mlx5/core: Fix stack frame size warnings
@ 2026-02-26  9:28 Cheng-Yang Chou
  2026-02-26  9:28 ` [PATCH 1/1] net/mlx5/core: Allocate ttc_params on heap Cheng-Yang Chou
  0 siblings, 1 reply; 6+ messages in thread
From: Cheng-Yang Chou @ 2026-02-26  9:28 UTC (permalink / raw)
  To: netdev, saeedm, tariqt, mbloch; +Cc: jserv, charlie910417, yphbchou0911

Hi,

This patch resolves stack frame size warnings in the mlx5 driver by
dynamically allocating 'struct ttc_params'. The structure exceeds the 
1024-byte limit, which risks causing stack overflows in deep execution paths.

While compiling the kernel, I encountered the following warnings:

drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c: In function ‘mlx5_lag_create_inner_ttc_table’:
drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c:543:1: warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  543 | }
      | ^
drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c: In function ‘mlx5_lag_create_ttc_table’:
drivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c:527:1: warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  527 | }
      | ^
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c: In function ‘mlx5e_create_rep_ttc_table’:
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:991:1: warning: the frame size of 1096 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  991 | }
      | ^
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c: In function ‘mlx5e_hairpin_rss_init’:
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:890:1: warning: the frame size of 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  890 | }
      | ^

Thanks,
Cheng-Yang

---

Cheng-Yang Chou (1):
  net/mlx5/core: Allocate ttc_params on heap

 .../net/ethernet/mellanox/mlx5/core/en_rep.c  | 15 +++++++++----
 .../net/ethernet/mellanox/mlx5/core/en_tc.c   | 15 ++++++++++---
 .../mellanox/mlx5/core/lag/port_sel.c         | 22 ++++++++++++++-----
 3 files changed, 39 insertions(+), 13 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-02-27  2:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-26  9:28 [PATCH 0/1] net/mlx5/core: Fix stack frame size warnings Cheng-Yang Chou
2026-02-26  9:28 ` [PATCH 1/1] net/mlx5/core: Allocate ttc_params on heap Cheng-Yang Chou
2026-02-26 10:05   ` Leon Romanovsky
2026-02-26 10:33     ` Cheng-Yang Chou
2026-02-26 18:15   ` Simon Horman
2026-02-27  2:38     ` Cheng-Yang Chou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox