tcp: TCP Fast Open Server - support TFO listeners
This patch builds on top of the previous patch to add the support for TFO listeners. This includes - 1. allocating, properly initializing, and managing the per listener fastopen_queue structure when TFO is enabled 2. changes to the inet_csk_accept code to support TFO. E.g., the request_sock can no longer be freed upon accept(), not until 3WHS finishes 3. allowing a TCP_SYN_RECV socket to properly poll() and sendmsg() if it's a TFO socket 4. properly closing a TFO listener, and a TFO socket before 3WHS finishes 5. supporting TCP_FASTOPEN socket option 6. modifying tcp_check_req() to use to check a TFO socket as well as request_sock 7. supporting TCP's TFO cookie option 8. adding a new SYN-ACK retransmit handler to use the timer directly off the TFO socket rather than the listener socket. Note that TFO server side will not retransmit anything other than SYN-ACK until the 3WHS is completed. The patch also contains an important function "reqsk_fastopen_remove()" to manage the somewhat complex relation between a listener, its request_sock, and the corresponding child socket. See the comment above the function for the detail. Signed-off-by:H.K. Jerry Chu <hkchu@google.com> Cc: Yuchung Cheng <ycheng@google.com> Cc: Neal Cardwell <ncardwell@google.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Tom Herbert <therbert@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/request_sock.h 0 additions, 13 deletionsinclude/net/request_sock.h
- include/net/tcp.h 4 additions, 2 deletionsinclude/net/tcp.h
- net/core/request_sock.c 95 additions, 0 deletionsnet/core/request_sock.c
- net/ipv4/af_inet.c 27 additions, 1 deletionnet/ipv4/af_inet.c
- net/ipv4/inet_connection_sock.c 51 additions, 6 deletionsnet/ipv4/inet_connection_sock.c
- net/ipv4/syncookies.c 1 addition, 0 deletionsnet/ipv4/syncookies.c
- net/ipv4/tcp.c 42 additions, 7 deletionsnet/ipv4/tcp.c
- net/ipv4/tcp_ipv4.c 2 additions, 2 deletionsnet/ipv4/tcp_ipv4.c
- net/ipv4/tcp_minisocks.c 50 additions, 11 deletionsnet/ipv4/tcp_minisocks.c
- net/ipv4/tcp_output.c 16 additions, 5 deletionsnet/ipv4/tcp_output.c
- net/ipv4/tcp_timer.c 38 additions, 1 deletionnet/ipv4/tcp_timer.c
- net/ipv6/syncookies.c 1 addition, 0 deletionsnet/ipv6/syncookies.c
- net/ipv6/tcp_ipv6.c 3 additions, 2 deletionsnet/ipv6/tcp_ipv6.c
Loading
Please register or sign in to comment