From: Jakub Kicinski Date: Mon, 15 Jun 2026 22:57:32 +0000 (-0700) Subject: Merge branch 'tcp-rehash-onto-different-local-ecmp-path-on-retransmit-timeout' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f80f60161497c1b5a1e15392b11e5f4e3a323e3;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'tcp-rehash-onto-different-local-ecmp-path-on-retransmit-timeout' Neil Spring says: ==================== tcp: rehash onto different local ECMP path on retransmit timeout 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. The cached route is reused and fib6_select_path() is never re-invoked, so the connection uses the same local ECMP decision. 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 from the (potentially re-rolled) hash. The override applies only to fib_multipath_hash_policy 0 (the default L3 policy). Its hash includes the flow label, but that is 0 by default (np->flow_label is unset; auto_flowlabels computes the on-wire label later, per packet), so flows to the same peer share one local path. Keying it on sk_txhash makes that local path per-connection and lets a rehash re-select it; even when a flow label is present (reflected REPFLOW or explicitly set) only local path selection changes -- the on-wire flow label is unaffected. Policies 1-3 are left unchanged. Patch 1 is the kernel change; patch 2 adds selftests covering rehash on SYN, SYN/ACK, midstream RTO, midstream spurious-retransmission, and PLB events, plus a policy 1 negative test, a flowlabel-leak regression test, a dst-rebuild consistency test, and a syncookie path-consistency test. ==================== Link: https://patch.msgid.link/20260615042158.1600746-1-ntspring@meta.com Signed-off-by: Jakub Kicinski --- 7f80f60161497c1b5a1e15392b11e5f4e3a323e3