From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Zhu Yanjun <yanjun.zhu@linux.dev>,
saeedm@nvidia.com, leon@kernel.org, tariqt@nvidia.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
linux-rdma@vger.kernel.org
Cc: Junxian Huang <huangjunxian6@hisilicon.com>
Subject: Re: [PATCHv4 net-next 1/1] net/mlx5: Fix build -Wframe-larger-than warnings
Date: Wed, 23 Jul 2025 08:13:08 +0300 [thread overview]
Message-ID: <bd54a7d5-c0bb-4116-93eb-ea2cff8cfe32@gmail.com> (raw)
In-Reply-To: <20250722212023.244296-1-yanjun.zhu@linux.dev>
On 23/07/2025 0:20, Zhu Yanjun wrote:
> When building, the following warnings will appear.
> "
> pci_irq.c: In function ‘mlx5_ctrl_irq_request’:
> pci_irq.c:494:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> pci_irq.c: In function ‘mlx5_irq_request_vector’:
> pci_irq.c:561:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> eq.c: In function ‘comp_irq_request_sf’:
> eq.c:897:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> irq_affinity.c: In function ‘irq_pool_request_irq’:
> irq_affinity.c:74:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> "
>
> These warnings indicate that the stack frame size exceeds 1024 bytes in
> these functions.
>
> To resolve this, instead of allocating large memory buffers on the stack,
> it is better to use kvzalloc to allocate memory dynamically on the heap.
> This approach reduces stack usage and eliminates these frame size warnings.
>
> Acked-by: Junxian Huang <huangjunxian6@hisilicon.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
> v3 -> v4: Relocate the kvzalloc call to a more appropriate place following Tariq's advice.
> v2 -> v3: No changes, just send out target net-next;
> v1 -> v2: Add kvfree to error handler;
>
> 1. This commit only build tests;
> 2. All the changes are on configuration path, will not make difference
> on the performance;
> 3. This commit is just to fix build warnings, not error or bug fixes. So
> not Fixes tag.
> ---
> drivers/net/ethernet/mellanox/mlx5/core/eq.c | 22 ++++++----
> .../mellanox/mlx5/core/irq_affinity.c | 19 +++++++--
> .../net/ethernet/mellanox/mlx5/core/pci_irq.c | 40 +++++++++++++------
> 3 files changed, 58 insertions(+), 23 deletions(-)
>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Thanks for your patch.
next prev parent reply other threads:[~2025-07-23 5:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 21:20 [PATCHv4 net-next 1/1] net/mlx5: Fix build -Wframe-larger-than warnings Zhu Yanjun
2025-07-23 5:13 ` Tariq Toukan [this message]
2025-07-25 2:00 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2025-07-22 3:13 Zhu Yanjun
2025-07-22 13:08 ` Tariq Toukan
2025-07-23 5:53 ` Zhu Yanjun
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=bd54a7d5-c0bb-4116-93eb-ea2cff8cfe32@gmail.com \
--to=ttoukan.linux@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=huangjunxian6@hisilicon.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=yanjun.zhu@linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).