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 <npig...@gmail.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 87ec668d5556..ef3a59012d26 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -900,9 +900,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.42.0 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev