Skip to content

tcp: lockless listener fixes and improvement

Eric Dumazet netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5tcp: fix fastopen races vs lockless listenernet/ipv4/tcp_fastopen.c net/ipv4/tcp_input.c+12 -200 replies
2/5inet: ip_skb_dst_mtu() should use sk_fullsock()include/net/ip.h+6 -30 replies
3/5ipv6: inet6_sk() should use sk_fullsock()include/linux/ipv6.h+2 -20 replies
4/5net: use sk_fullsock() in __netdev_pick_tx()include/net/request_sock.h net/core/dev.c+2 -00 replies
5/5tcp: avoid two atomic ops for syncookiesinclude/net/inet_sock.h include/net/request_sock.h net/dccp/ipv4.c +4 more+19 -110 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH net-next 0/5] tcp: lockless listener fixes and improvement

This fixes issues with TCP FastOpen vs lockless listeners, and SYNACK being attached to request sockets.

Then, last patch brings performance improvement for syncookies generation and validation.

Tested under a 4.3 Mpps SYNFLOOD attack, new perf profile looks like :

    12.11%  [kernel]  [k] sha_transform
     5.83%  [kernel]  [k] tcp_conn_request
     4.59%  [kernel]  [k] __inet_lookup_listener
     4.11%  [kernel]  [k] ipt_do_table
     3.91%  [kernel]  [k] tcp_make_synack
     3.05%  [kernel]  [k] fib_table_lookup
     2.74%  [kernel]  [k] sock_wfree
     2.66%  [kernel]  [k] memcpy_erms
     2.12%  [kernel]  [k] tcp_v4_rcv

Eric Dumazet (5):
tcp: fix fastopen races vs lockless listener
inet: ip_skb_dst_mtu() should use sk_fullsock()
ipv6: inet6_sk() should use sk_fullsock()
net: use sk_fullsock() in __netdev_pick_tx()
tcp: avoid two atomic ops for syncookies

 include/linux/ipv6.h       |  4 ++--
 include/net/inet_sock.h    |  3 ++-
 include/net/ip.h           |  9 ++++++---
 include/net/request_sock.h | 12 +++++++++---
 net/core/dev.c             |  1 +
 net/dccp/ipv4.c            |  2 +-
 net/dccp/ipv6.c            |  2 +-
 net/ipv4/syncookies.c      |  2 +-
 net/ipv4/tcp_fastopen.c    | 26 +++++++-------------------
 net/ipv4/tcp_input.c       | 14 ++++++++++----
 net/ipv6/syncookies.c      |  2 +-
 11 files changed, 41 insertions(+), 36 deletions(-)
Signature · 1 line
2.6.0.rc2.230.g3dd15c0