Subject: Re: [PATCH net-next v6 0/2] tcp: rehash onto different local ECMP path on retransmit timeout

From: Jakub Kicinski <[email-masked]>
Date: Mon, 18 May 2026 13:08:24 -0700

On Sun, 17 May 2026 10:45:20 -0700 Neil Spring wrote:
> Currently sk_rethink_txhash() re-rolls the socket's txhash on RTO,
> PLB, and spurious-retransmission events, but the new hash is not
> propagated into the IPv6 ECMP path selection logic.  The cached
> route is reused and fib6_select_path() is never re-invoked, so
> the connection stays on the same ECMP path.
> 
> This series adds the two missing pieces:
> 
> 1. __sk_dst_reset() alongside sk_rethink_txhash() so the cached dst
>    is invalidated and the next transmit triggers a fresh route lookup.
> 
> 2. fl6->mp_hash set from sk_txhash before each route lookup so
>    fib6_select_path() picks a path based on the (potentially re-rolled)
>    hash.  This is conditioned on fib_multipath_hash_policy == 0 (L3)
>    because policies 1-3 compute a deterministic hash from the flow
>    keys which must not be overridden.
> 
> Patch 1 is the kernel change; patch 2 adds selftests covering SYN
> rehash, SYN/ACK rehash, midstream RTO rehash, midstream ACK rehash
> (spurious retransmission), PLB rehash, a policy 1 negative test,
> a flowlabel leak regression test, and two dst rebuild consistency
> tests (normal and syncookie) verifying that natural route
> invalidation does not cause unintended path changes.

Still flakes:

https://netdev-ctrl.bots.linux.dev/logs/vmksft/net/results/652122/44-ecmp-rehash-sh/stdout

https://netdev-ctrl.bots.linux.dev/logs/vmksft/net-dbg/results/652122/34-ecmp-rehash-sh/stdout
-- 
pw-bot: cr