From: Cheng-Yang Chou <yphbchou0911@gmail.com>
To: netdev@vger.kernel.org, saeedm@nvidia.com, tariqt@nvidia.com,
mbloch@nvidia.com
Cc: jserv@ccns.ncku.edu.tw, charlie910417@gmail.com, yphbchou0911@gmail.com
Subject: [PATCH 0/1] net/mlx5/core: Fix stack frame size warnings
Date: Thu, 26 Feb 2026 17:28:54 +0800 [thread overview]
Message-ID: <20260226092857.1583984-1-yphbchou0911@gmail.com> (raw)
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
next reply other threads:[~2026-02-26 9:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 9:28 Cheng-Yang Chou [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260226092857.1583984-1-yphbchou0911@gmail.com \
--to=yphbchou0911@gmail.com \
--cc=charlie910417@gmail.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox