Skip to content

dccp/tcp: constify listener sock

Eric Dumazet netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17tcp: constify listener socket in tcp_v[46]_init_req()include/net/tcp.h net/ipv4/tcp_ipv4.c net/ipv6/tcp_ipv6.c+9 -60 replies
2/17tcp: constify tcp_openreq_init_rwin()include/net/tcp.h net/ipv4/tcp_minisocks.c+20 -110 replies
3/17inet: constify ip_route_output_flow() socket argumentinclude/net/dst.h include/net/route.h net/ipv4/route.c +1 more+10 -90 replies
4/17inet: constify inet_csk_route_req() socket argumentinclude/net/inet_connection_sock.h net/ipv4/inet_connection_sock.c+2 -20 replies
5/17ipv6: constify ip6_dst_lookup_{flow|tail}() sock argumentsinclude/net/ipv6.h net/ipv6/ip6_output.c+3 -30 replies
6/17ipv6: constify inet6_csk_route_req() socket argumentinclude/net/inet6_connection_sock.h net/ipv6/inet6_connection_sock.c+2 -20 replies
7/17inet: constify ip_dont_fragment() argumentsinclude/net/ip.h+5 -30 replies
8/17tcp: md5: constify tcp_md5_do_lookup() socket argumentinclude/net/tcp.h net/ipv4/tcp_ipv4.c net/ipv6/tcp_ipv6.c+10 -100 replies
9/17ip: constify ip_build_and_send_pkt() socket argumentinclude/net/ip.h net/ipv4/ip_output.c+9 -70 replies
10/17tcp: remove tcp_synack_options() socket argumentnet/ipv4/tcp_output.c+7 -80 replies
11/17tcp: remove tcp_ecn_make_synack() socket argumentnet/ipv4/tcp_cong.c net/ipv4/tcp_output.c+13 -90 replies
12/17tcp: constify tcp_make_synack() socket argumentinclude/net/tcp.h net/ipv4/tcp_output.c+16 -100 replies
13/17ipv6: constify ip6_xmit() sock argumentinclude/net/ipv6.h net/ipv6/datagram.c net/ipv6/ip6_output.c+21 -90 replies
14/17tcp: constify tcp_v{4|6}_send_synack() socket argumentinclude/net/tcp.h net/ipv4/tcp_ipv4.c net/ipv6/tcp_ipv6.c+3 -30 replies
15/17dccp: constify dccp_make_response() socket argumentnet/dccp/dccp.h net/dccp/output.c+12 -70 replies
16/17tcp/dccp: constify rtx_synack() and friendsinclude/net/request_sock.h include/net/tcp.h net/dccp/ipv4.c +2 more+5 -50 replies
17/17inet: constify inet_rtx_syn_ack() sock argumentinclude/net/request_sock.h net/ipv4/inet_connection_sock.c+2 -20 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 00/17] dccp/tcp: constify listener sock

Another patch bomb to prepare lockless TCP/DCCP LISTEN handling.

SYNACK retransmits are built and sent without listener socket being locked. Soon, initial SYNACK packets will have same property.

This series makes sure we did not something wrong with this model, by adding a const qualifier in all the paths taken from synack building and transmit, for IPv4/IPv6 and TCP/dccp.

The only potential problem was the rewrite of ecn bits for connections with DCTCP as congestion module, but this was a very minor one.

Eric Dumazet (17):
tcp: constify listener socket in tcp_v[46]_init_req()
tcp: constify tcp_openreq_init_rwin()
inet: constify ip_route_output_flow() socket argument
inet: constify inet_csk_route_req() socket argument
ipv6: constify ip6_dst_lookup_{flow|tail}() sock arguments
ipv6: constify inet6_csk_route_req() socket argument
inet: constify ip_dont_fragment() arguments
tcp: md5: constify tcp_md5_do_lookup() socket argument
ip: constify ip_build_and_send_pkt() socket argument
tcp: remove tcp_synack_options() socket argument
tcp: remove tcp_ecn_make_synack() socket argument
tcp: constify tcp_make_synack() socket argument
ipv6: constify ip6_xmit() sock argument
tcp: constify tcp_v{4|6}_send_synack() socket argument
dccp: constify dccp_make_response() socket argument tcp/dccp: constify rtx_synack() and friends
inet: constify inet_rtx_syn_ack() sock argument
---
David, to apply these patches you'll need to merge net tree into net-next first. Thanks !

 include/net/dst.h                   |  9 ++++---
 include/net/inet6_connection_sock.h |  2 +-
 include/net/inet_connection_sock.h  |  2 +-
 include/net/ip.h                    | 10 +++++---
 include/net/ipv6.h                  |  4 +--
 include/net/request_sock.h          |  4 +--
 include/net/route.h                 |  2 +-
 include/net/tcp.h                   | 22 ++++++++--------
 net/dccp/dccp.h                     |  2 +-
 net/dccp/ipv4.c                     |  2 +-
 net/dccp/ipv6.c                     |  2 +-
 net/dccp/output.c                   | 17 ++++++++-----
 net/ipv4/inet_connection_sock.c     |  4 +--
 net/ipv4/ip_output.c                | 14 +++++-----
 net/ipv4/route.c                    |  2 +-
 net/ipv4/tcp_cong.c                 | 12 +++++++--
 net/ipv4/tcp_ipv4.c                 | 11 ++++----
 net/ipv4/tcp_minisocks.c            | 28 ++++++++++++--------
 net/ipv4/tcp_output.c               | 51 +++++++++++++++++++------------------
 net/ipv6/datagram.c                 |  2 +-
 net/ipv6/inet6_connection_sock.c    |  2 +-
 net/ipv6/ip6_output.c               | 30 +++++++++++++++-------
 net/ipv6/tcp_ipv6.c                 | 15 ++++++-----
 net/xfrm/xfrm_policy.c              |  6 ++---
 24 files changed, 149 insertions(+), 106 deletions(-)
Signature · 1 line
2.6.0.rc2.230.g3dd15c0