[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4dd86c71-b6b7-483d-abe4-0fc40c51bc5e@uliege.be>
Date: Thu, 30 Jan 2025 01:24:00 +0100
From: Justin Iurman <justin.iurman@...ege.be>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
dsahern@...nel.org
Subject: Re: [PATCH net 2/2] net: ipv6: fix dst ref loops in rpl, seg6 and
ioam6 lwtunnels
On 1/29/25 21:14, Jakub Kicinski wrote:
> On Wed, 29 Jan 2025 17:50:14 +0100 Justin Iurman wrote:
>>> + if (dst->lwtstate != cache_dst->lwtstate) {
>>> + local_bh_disable();
>>> + dst_cache_set_ip6(&ilwt->cache, cache_dst, &fl6.saddr);
>>> + local_bh_enable();
>>> + }
>>
>> I agree the above patch fixes what kmemleak reported. However, I think
>> it'd bring the double-reallocation issue back when the packet
>> destination did not change (i.e., cache will always be empty). I'll try
>> to come up with a solution...
>
> True, dunno enough about use cases so I may be missing the point.
Possible use cases: (i) with inline mode, or (ii) with encap mode using
the same destination address. For (ii), the egress node of the IOAM
domain also happens to be the actual destination of the packet, but it's
not "your" packet... so you use a tunnel to stay compliant with RFC8200.
> But the naive solution would be to remember that the tunnel "doesn't
> re-route" and use dst directly, instead of cache_dst?
Correct, that'd work.
Powered by blists - more mailing lists