From: Eric Dumazet <edumazet@google.com>
To: Ilya Maximets <i.maximets@ovn.org>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org, dev@openvswitch.org,
Pravin B Shelar <pshelar@ovn.org>,
Eelco Chaudron <echaudro@redhat.com>
Subject: Re: [PATCH net-next v2] openvswitch: reduce stack usage in do_execute_actions
Date: Thu, 21 Sep 2023 21:58:27 +0200 [thread overview]
Message-ID: <CANn89iJxrsgeS_FOivxPdYLhPyLC6Lo8VBzLjdx9-mQKXxqjwA@mail.gmail.com> (raw)
In-Reply-To: <20230921194314.1976605-1-i.maximets@ovn.org>
On Thu, Sep 21, 2023 at 9:42 PM Ilya Maximets <i.maximets@ovn.org> wrote:
>
> do_execute_actions() function can be called recursively multiple
> times while executing actions that require pipeline forking or
> recirculations. It may also be re-entered multiple times if the packet
> leaves openvswitch module and re-enters it through a different port.
>
> Currently, there is a 256-byte array allocated on stack in this
> function that is supposed to hold NSH header. Compilers tend to
> pre-allocate that space right at the beginning of the function:
>
> a88: 48 81 ec b0 01 00 00 sub $0x1b0,%rsp
>
> NSH is not a very common protocol, but the space is allocated on every
> recursive call or re-entry multiplying the wasted stack space.
>
Reviewed-by: Eric Dumazet <edumazet@google.com>
next prev parent reply other threads:[~2023-09-21 19:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 19:42 [PATCH net-next v2] openvswitch: reduce stack usage in do_execute_actions Ilya Maximets
2023-09-21 19:58 ` Eric Dumazet [this message]
2023-09-22 6:43 ` Eelco Chaudron
2023-09-27 20:24 ` [ovs-dev] " Aaron Conole
2023-10-01 18:10 ` 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=CANn89iJxrsgeS_FOivxPdYLhPyLC6Lo8VBzLjdx9-mQKXxqjwA@mail.gmail.com \
--to=edumazet@google.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=echaudro@redhat.com \
--cc=i.maximets@ovn.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pshelar@ovn.org \
/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).