Skip to content

Ipv6 TCP timewait recycling support

David Miller netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7inetpeer: Kill use of inet_peer_address_t typedef.include/net/inetpeer.h net/ipv4/inetpeer.c+10 -100 replies
2/7inetpeer: Fix incorrect comment about inetpeer struct size.include/net/inetpeer.h+0 -10 replies
3/7timewait_sock: Create and use getpeer op.include/net/tcp.h include/net/timewait_sock.h net/ipv4/tcp_ipv4.c +2 more+63 -370 replies
4/7ipv6: Add rt6_get_peer() helper.include/net/ip6_route.h+9 -00 replies
5/7ipv6: Create inet6_csk_route_req().include/net/inet6_connection_sock.h net/ipv6/inet6_connection_sock.c+35 -00 replies
6/7tcp: Add timewait recycling bits to ipv6 connect code.net/core/request_sock.c net/ipv6/tcp_ipv6.c+77 -250 replies
7/7tcp: Implement ipv6 ->get_peer() and ->tw_get_peer().net/ipv6/tcp_ipv6.c+18 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] Ipv6 TCP timewait recycling support

First we start with two simple cleanups, un-typedef'ification and a comment fixup.

Then we add the infrastructure to allow the tcp_minisocks.c timewait recycling code able to be generic and use various ->ops

Sadly, the ipv6 timewait ops are used even for v4-mapped addresses so we need a special check in the ipv6 timewait getpeer implementation. This is similar to the situation we have in tcp_v6_hash().

Doing these changes also pointed out that our listening socket incoming connection policy in the non-syncookies case as being handled differently for ipv4 vs. ipv6. This has been rectified. The issue is that for ipv4 we were reserving the final 1/4 of the backlog queue to validated destinations.

In the final patch we throw the switch and implement the two getpeer operations for ipv6, which fully enables timewait recyling for ipv6.