[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJxrsgeS_FOivxPdYLhPyLC6Lo8VBzLjdx9-mQKXxqjwA@mail.gmail.com>
Date: Thu, 21 Sep 2023 21:58:27 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Ilya Maximets <i.maximets@....org>
Cc: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org,
dev@...nvswitch.org, Pravin B Shelar <pshelar@....org>,
Eelco Chaudron <echaudro@...hat.com>
Subject: Re: [PATCH net-next v2] openvswitch: reduce stack usage in do_execute_actions
On Thu, Sep 21, 2023 at 9:42 PM Ilya Maximets <i.maximets@....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@...gle.com>
Powered by blists - more mailing lists