From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Manish Chopra <manishc@marvell.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Nathan Chancellor" <nathan@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <llvm@lists.linux.dev>
Subject: Re: [PATCH] net: qed: reduce stack usage for TLV processing
Date: Fri, 20 Jun 2025 16:09:34 +0200 [thread overview]
Message-ID: <c898e879-26e6-4701-9baa-f9d2444e3137@intel.com> (raw)
In-Reply-To: <20250620130958.2581128-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@kernel.org>
Date: Fri, 20 Jun 2025 15:09:53 +0200
> From: Arnd Bergmann <arnd@arndb.de>
>
> clang gets a bit confused by the code in the qed_mfw_process_tlv_req and
> ends up spilling registers to the stack hundreds of times. When sanitizers
> are enabled, this can end up blowing the stack warning limit:
>
> drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c:1244:5: error: stack frame size (1824) exceeds limit (1280) in 'qed_mfw_process_tlv_req' [-Werror,-Wframe-larger-than]
>
> Apparently the problem is the complexity of qed_mfw_update_tlvs()
> after inlining, and marking the four main branches of that function
> as noinline_for_stack makes this problem completely go away, the stack
> usage goes down to 100 bytes.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Thanks,
Olek
next prev parent reply other threads:[~2025-06-20 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 13:09 Arnd Bergmann
2025-06-20 14:09 ` Alexander Lobakin [this message]
2025-06-23 13:30 ` patchwork-bot+netdevbpf
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=c898e879-26e6-4701-9baa-f9d2444e3137@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=justinstitt@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=manishc@marvell.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®