Subject: Re: [PATCH v3] net/mlx5/core: Allocate ttc_params on heap

From: Cheng-Yang Chou <[email-masked]>
Date: Tue, 3 Mar 2026 18:36:39 +0800

On Fri, Feb 27, 2026 at 01:46:01AM +0800, Cheng-Yang Chou wrote:
> The ttc_params structure is too large to be allocated on the stack,
> triggering warnings for exceeding the 1024-byte frame size limit.
> Consuming excessive stack space risks causing stack overflows.
> 
> Allocate the structure dynamically to maintain safe stack boundaries.
> 
> Signed-off-by: Po-Ying Chiu <[email-masked]>
> Signed-off-by: Cheng-Yang Chou <[email-masked]>
> Suggested-by: Leon Romanovsky <[email-masked]>
> ---
> Changes in v3:
> - Use tabs instead of spaces for indentation
> - Link to v2: https://lore.kernel.org/all/[email-masked]/
> 
> Changes in v2:
> - Use kzalloc_obj() instead of kzalloc() to align with the new memory 
>   allocation API introduced in v7.0-rc1 (Leon Romanovsky)
> - Link to v1: https://lore.kernel.org/all/[email-masked]/
> 
>  .../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(-)

Gentle ping.
Please let me know if any changes are needed.

-- 
Thanks,
Cheng-Yang