[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <641c2376-8e58-42d5-a934-acad5782b9f0@uliege.be>
Date: Thu, 13 Mar 2025 15:45:55 +0100
From: Justin Iurman <justin.iurman@...ege.be>
To: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net, dsahern@...nel.org, edumazet@...gle.com,
kuba@...nel.org, horms@...nel.org, David Lebrun <dlebrun@...gle.com>,
Andrea Mayer <andrea.mayer@...roma2.it>,
Stefano Salsano <stefano.salsano@...roma2.it>,
Ahmed Abdelsalam <ahabdels.dev@...il.com>,
Mathieu Xhonneux <m.xhonneux@...il.com>, Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net 4/7] net: ipv6: seg6_local: fix lwtunnel_input() loop
On 3/13/25 13:40, Paolo Abeni wrote:
> On 3/11/25 3:12 PM, Justin Iurman wrote:
>> ---
>> net/ipv6/seg6_local.c | 85 +++++++++++++++++++++++++++++++++++++++++--
>> 1 file changed, 81 insertions(+), 4 deletions(-)
>>
>> diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
>> index ac1dbd492c22..15485010cdfb 100644
>> --- a/net/ipv6/seg6_local.c
>> +++ b/net/ipv6/seg6_local.c
>> @@ -378,8 +378,16 @@ static void seg6_next_csid_advance_arg(struct in6_addr *addr,
>> static int input_action_end_finish(struct sk_buff *skb,
>> struct seg6_local_lwt *slwt)
>> {
>> + struct lwtunnel_state *lwtst = skb_dst(skb)->lwtstate;
>> +
>> seg6_lookup_nexthop(skb, NULL, 0);
>>
>> + /* avoid lwtunnel_input() reentry loop when destination is the same
>> + * after transformation
>> + */
>> + if (lwtst == skb_dst(skb)->lwtstate)
>> + return lwtst->orig_input(skb);
>> +
>> return dst_input(skb);
>
> The above few lines are repeted a lot of times below. Please factor them
> out in an helper and re-use it.
+1, although this patch (and some others) will be removed from the
series in -v2. That said, Paolo's remark may be applied to Andrea's
seg6-related patches that will follow.
> Thanks,
>
> Paolo
>
Powered by blists - more mailing lists