[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de0104f3-2a2c-44ee-a3e9-8acc927cbfc6@redhat.com>
Date: Thu, 13 Mar 2025 13:46:33 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Justin Iurman <justin.iurman@...ege.be>, netdev@...r.kernel.org
Cc: davem@...emloft.net, dsahern@...nel.org, edumazet@...gle.com,
kuba@...nel.org, horms@...nel.org, Tom Herbert <tom@...bertland.com>,
Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net 5/7] net: ipv6: ila: fix lwtunnel_output() loop
On 3/11/25 3:12 PM, Justin Iurman wrote:
> diff --git a/net/ipv6/ila/ila_lwt.c b/net/ipv6/ila/ila_lwt.c
> index 7d574f5132e2..67f7c7015693 100644
> --- a/net/ipv6/ila/ila_lwt.c
> +++ b/net/ipv6/ila/ila_lwt.c
> @@ -96,6 +96,14 @@ static int ila_output(struct net *net, struct sock *sk, struct sk_buff *skb)
> }
> }
>
> + /* avoid lwtunnel_output() reentry loop when destination is the same
> + * after transformation
> + */
> + if (orig_dst->lwtstate == dst->lwtstate) {
> + dst_release(dst);
> + return orig_dst->lwtstate->orig_output(net, sk, skb);
> + }
> +
> skb_dst_drop(skb);
> skb_dst_set(skb, dst);
> return dst_output(net, sk, skb);
Even this pattern is repeated verbatim in patch 3, and I think it should
deserve a shared helper. Also a bit of a pity there are a few variations
that do not fit cleanly a common helper, but I guess there is little to
do about that for 'net'.
Thanks,
Paolo
Powered by blists - more mailing lists