mbox series

[net,v5,0/3] Avoid TCP resets when using ECMP for load-balancing between multiple servers.

Message ID 20230831080332.2495-1-sriram.yagnaraman@est.tech (mailing list archive)
Headers show
Series Avoid TCP resets when using ECMP for load-balancing between multiple servers. | expand

Message

Sriram Yagnaraman Aug. 31, 2023, 8:03 a.m. UTC
All packets in the same flow (L3/L4 depending on multipath hash policy)
should be directed to the same target, but after [0]/[1] we see stray
packets directed towards other targets. This, for instance, causes RST
to be sent on TCP connections.

The first two patches solve the problem by ignoring route hints for
destinations that are part of multipath group, by using new SKB flags
for IPv4 and IPv6. The third patch is a selftest that tests the
scenario.

Thanks to Ido, for reviewing and suggesting a way forward in [2] and
also suggesting how to write a selftest for this.

v4->v5:
- Fixed review comments from Ido
v3->v4:
- Remove single path test
- Rebase to latest
v2->v3:
- Add NULL check for skb in fib6_select_path (Ido Schimmel)
- Use fib_tests.sh for selftest instead of the forwarding suite (Ido
  Schimmel)
v1->v2:
- Update to commit messages describing the solution (Ido Schimmel)
- Use perf stat to count fib table lookups in selftest (Ido Schimmel)


Sriram Yagnaraman (3):
  ipv4: ignore dst hint for multipath routes
  ipv6: ignore dst hint for multipath routes
  selftests: fib_tests: Add multipath list receive tests

 include/linux/ipv6.h                     |   1 +
 include/net/ip.h                         |   1 +
 net/ipv4/ip_input.c                      |   3 +-
 net/ipv4/route.c                         |   1 +
 net/ipv6/ip6_input.c                     |   3 +-
 net/ipv6/route.c                         |   3 +
 tools/testing/selftests/net/fib_tests.sh | 155 ++++++++++++++++++++++-
 7 files changed, 164 insertions(+), 3 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Sept. 1, 2023, 7:20 a.m. UTC | #1
Hello:

This series was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu, 31 Aug 2023 10:03:29 +0200 you wrote:
> All packets in the same flow (L3/L4 depending on multipath hash policy)
> should be directed to the same target, but after [0]/[1] we see stray
> packets directed towards other targets. This, for instance, causes RST
> to be sent on TCP connections.
> 
> The first two patches solve the problem by ignoring route hints for
> destinations that are part of multipath group, by using new SKB flags
> for IPv4 and IPv6. The third patch is a selftest that tests the
> scenario.
> 
> [...]

Here is the summary with links:
  - [net,v5,1/3] ipv4: ignore dst hint for multipath routes
    https://git.kernel.org/netdev/net/c/6ac66cb03ae3
  - [net,v5,2/3] ipv6: ignore dst hint for multipath routes
    https://git.kernel.org/netdev/net/c/8423be8926aa
  - [net,v5,3/3] selftests: fib_tests: Add multipath list receive tests
    https://git.kernel.org/netdev/net/c/8ae9efb859c0

You are awesome, thank you!