netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] ip: improve tcp sock multipath routing
@ 2025-04-20 18:04 Willem de Bruijn
  2025-04-20 18:04 ` [PATCH net-next 1/3] ipv4: prefer multipath nexthop that matches source address Willem de Bruijn
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Willem de Bruijn @ 2025-04-20 18:04 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, edumazet, pabeni, dsahern, horms, idosch, kuniyu,
	Willem de Bruijn

From: Willem de Bruijn <willemb@google.com>

Improve layer 4 multipath hash policy for local tcp connections:

patch 1: Select a source address that matches the nexthop device.
         Due to tcp_v4_connect making separate route lookups for saddr
         and route, the two can currently be inconsistent.

patch 2: Use all paths when opening multiple local tcp connections to
         the same ip address and port.

patch 3: Test the behavior of patch 2. Extend the fib_nexthops.sh
         testsuite with one opening many connections, and count SYNs
         on both egress devices.

Willem de Bruijn (3):
  ipv4: prefer multipath nexthop that matches source address
  ip: load balance tcp connections to single dst addr and port
  selftests/net: test tcp connection load balancing

 include/net/flow.h                          |  1 +
 include/net/ip_fib.h                        |  3 +-
 include/net/route.h                         |  3 +
 net/ipv4/fib_semantics.c                    | 39 ++++++----
 net/ipv4/route.c                            | 15 +++-
 net/ipv6/route.c                            | 13 +++-
 net/ipv6/tcp_ipv6.c                         |  2 +
 tools/testing/selftests/net/fib_nexthops.sh | 83 +++++++++++++++++++++
 8 files changed, 137 insertions(+), 22 deletions(-)

-- 
2.49.0.805.g082f7c87e0-goog


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-04-23 14:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-20 18:04 [PATCH net-next 0/3] ip: improve tcp sock multipath routing Willem de Bruijn
2025-04-20 18:04 ` [PATCH net-next 1/3] ipv4: prefer multipath nexthop that matches source address Willem de Bruijn
2025-04-22 16:06   ` David Ahern
2025-04-20 18:04 ` [PATCH net-next 2/3] ip: load balance tcp connections to single dst addr and port Willem de Bruijn
2025-04-21 13:54   ` Willem de Bruijn
2025-04-22 16:41   ` David Ahern
2025-04-22 18:07     ` Willem de Bruijn
2025-04-20 18:04 ` [PATCH net-next 3/3] selftests/net: test tcp connection load balancing Willem de Bruijn
2025-04-23  9:05   ` Ido Schimmel
2025-04-23 14:18     ` Willem de Bruijn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).