[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230927001308.749910-6-npiggin@gmail.com>
Date: Wed, 27 Sep 2023 10:13:06 +1000
From: Nicholas Piggin <npiggin@...il.com>
To: netdev@...r.kernel.org
Cc: Nicholas Piggin <npiggin@...il.com>,
dev@...nvswitch.org,
Pravin B Shelar <pshelar@....org>
Subject: [RFC PATCH 5/7] net: openvswitch: uninline ovs_fragment to control stack usage
ovs_fragment uses a lot of stack, 400 bytes. It is a leaf function
but its caller do_output is involved in openvswitch recursion.
GCC 13.2 for powerpc64le is not inlining it, but it only has a single
call site, so it is liable to being inlined.
Mark it noinline_for_stack, to ensure it doesn't bloat stack use in
the recursive path.
Signed-off-by: Nicholas Piggin <npiggin@...il.com>
---
net/openvswitch/actions.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index b4d4150c5e69..12ad998b70e2 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -849,9 +849,9 @@ static void prepare_frag(struct vport *vport, struct sk_buff *skb,
skb_pull(skb, hlen);
}
-static void ovs_fragment(struct net *net, struct vport *vport,
- struct sk_buff *skb, u16 mru,
- struct sw_flow_key *key)
+static noinline_for_stack
+void ovs_fragment(struct net *net, struct vport *vport, struct sk_buff *skb,
+ u16 mru, struct sw_flow_key *key)
{
enum ovs_drop_reason reason;
u16 orig_network_offset = 0;
--
2.40.1
Powered by blists - more mailing lists