[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63b0f262-066a-4f7b-b55a-a7f0ed4aa7f4@redhat.com>
Date: Tue, 10 Dec 2024 09:32:40 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Philo Lu <lulie@...ux.alibaba.com>, Eric Dumazet <edumazet@...gle.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
David Ahern <dsahern@...nel.org>, Jakub Kicinski <kuba@...nel.org>,
Simon Horman <horms@...nel.org>, Fred Chen <fred.cc@...baba-inc.com>,
Cambda Zhu <cambda@...ux.alibaba.com>, Willem de Bruijn
<willemb@...gle.com>, Stefano Brivio <sbrivio@...hat.com>
Subject: Re: [PATCH net] udp: fix l4 hash after reconnect
On 12/7/24 03:34, Philo Lu wrote:
> On 2024/12/7 00:23, Paolo Abeni wrote:
>> On 12/6/24 17:01, Eric Dumazet wrote:
>>> BTW, it seems that udp_lib_rehash() does the udp_rehash4()
>>> only if the hash2 has changed.
>>
>> Oh, you are right, that requires a separate fix.
>>
>> @Philo: could you please have a look at that? basically you need to
>> check separately for hash2 and hash4 changes.
>
> This is a good question. IIUC, the only affected case is when trying to
> re-connect another remote address with the same local address
AFAICS, there is also another case: when re-connection using a different
local addresses with the same l2 hash...
> (i.e.,
> hash2 unchanged). And this will be handled by udp_lib_hash4(). So in
> udp_lib_rehash() I put rehash4() inside hash2 checking, which means a
> passive rehash4 following rehash2.
... but even the latter case should be covered from the above.
> So I think it's more about the convention for rehash. We can choose the
> better one.
IIRC a related question raised during code review for the udp L4 hash
patches. Perhaps refactoring the code slightly to let udp_rehash()
really doing the re-hashing and udp_hash really doing only the hashing
could be worth.
Cheers,
Paolo
Powered by blists - more mailing lists