Skip to content

ip: improve tcp sock multipath routing

Willem de Bruijn netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 10 repliesApplied 3/3
  2. v13 patches 6 repliesSuperseded

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3ipv4: prefer multipath nexthop that matches source addressinclude/net/ip_fib.h net/ipv4/fib_semantics.c net/ipv4/route.c+28 -166 repliesApplied
2/3ip: load balance tcp connections to single dst addr and portinclude/net/flow.h include/net/route.h net/ipv4/route.c +2 more+26 -63 repliesApplied
3/3selftests/net: test tcp connection load balancingtools/testing/selftests/net/fib_tests.sh tools/testing/selftests/net/lib.sh+143 -11 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchDavid AhernEric DumazetIdo Schimmel
1/3R-b R-b R-b
2/3R-b R-b R-b
3/3R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH net-next v2 0/3] ip: improve tcp sock multipath routing

From: Willem de Bruijn <[email protected]>

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. Extend the fib_tests.sh testsuite with one
opening many connections, and count SYNs on both egress devices, for packets matching the source address of the dev.

Changelog in the individual patches

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_tests.sh | 120 ++++++++++++++++++++++-
 tools/testing/selftests/net/lib.sh       |  24 +++++
 9 files changed, 197 insertions(+), 23 deletions(-)
Signature · 1 line
2.49.0.805.g082f7c87e0-goog