Skip to content

tcp: Refactor bhash2 and remove sk_bind2_node.

Kuniyuki Iwashima netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/212 patches 10 repliesApplied 12/12
  2. v2 posting 1/212 patches 4 repliesSuperseded
  3. v112 patches 2 repliesSuperseded

Patches in v2 posting 2/2 All 12 applied

#Subject and filesSizeRepliesApplied
1/12tcp: Use bhash2 for v4-mapped-v6 non-wildcard address.net/ipv4/inet_connection_sock.c net/ipv4/inet_hashtables.c+7 -30 repliesApplied
2/12tcp: Rearrange tests in inet_bind2_bucket_(addr_match|match_addr_any)().net/ipv4/inet_hashtables.c+12 -131 replyApplied
3/12tcp: Save v4 address as v4-mapped-v6 in inet_bind2_bucket.v6_rcv_saddr.include/net/inet_hashtables.h include/net/ipv6.h net/ipv4/inet_hashtables.c+21 -290 repliesApplied
4/12tcp: Save address type in inet_bind2_bucket.include/net/inet_hashtables.h net/ipv4/inet_hashtables.c+14 -161 replyApplied
5/12tcp: Rename tb in inet_bind2_bucket_(init|create)().net/ipv4/inet_hashtables.c+16 -161 replyApplied
6/12tcp: Link bhash2 to bhash.include/net/inet_hashtables.h net/ipv4/inet_connection_sock.c net/ipv4/inet_hashtables.c+15 -121 replyApplied
7/12tcp: Rearrange tests in inet_csk_bind_conflict().net/ipv4/inet_connection_sock.c+19 -211 replyApplied
8/12tcp: Iterate tb->bhash2 in inet_csk_bind_conflict().net/ipv4/inet_connection_sock.c+17 -11 replyApplied
9/12tcp: Check hlist_empty(&tb->bhash2) instead of hlist_empty(&tb->owners).net/ipv4/inet_connection_sock.c net/ipv4/inet_hashtables.c net/ipv4/inet_timewait_sock.c+8 -91 replyApplied
10/12tcp: Unlink sk from bhash.include/net/inet_hashtables.h net/ipv4/inet_hashtables.c net/ipv4/inet_timewait_sock.c+0 -121 replyApplied
11/12tcp: Link sk and twsk to tb2->owners using skc_bind_node.include/net/sock.h net/ipv4/inet_connection_sock.c net/ipv4/inet_diag.c +2 more+9 -261 replyApplied
12/12tcp: Remove dead code and fields for bhash2.include/net/inet_hashtables.h include/net/inet_timewait_sock.h include/net/sock.h +2 more+1 -351 replyApplied

Reviews trailers per patch

All 12 patches have a Reviewed-by or Acked-by.

PatchEric Dumazet
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b
9/12R-b
10/12R-b
11/12R-b
12/12R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH RESEND v2 net-next 00/12] tcp: Refactor bhash2 and remove sk_bind2_node.

This series refactors code around bhash2 and remove some bhash2-specific fields; sock.sk_bind2_node, and inet_timewait_sock.tw_bind2_node.

patch 1 : optimise bind() for non-wildcard v4-mapped-v6 address
patch 2 - 4 : optimise bind() conflict tests
patch 5 - 12 : Link bhash2 to bhash and unlink sk from bhash2 to
remove sk_bind2_node

The patch 8 will trigger a false-positive error by checkpatch.

v2: resend of https://lore.kernel.org/netdev/[email protected]/
* Rebase on latest net-next
* Patch 11
* Add change in inet_diag_dump_icsk() for recent bhash dump patch

v1: https://lore.kernel.org/netdev/[email protected]/

Kuniyuki Iwashima (12):
tcp: Use bhash2 for v4-mapped-v6 non-wildcard address.
tcp: Rearrange tests in

    inet_bind2_bucket_(addr_match|match_addr_any)().
  tcp: Save v4 address as v4-mapped-v6 in
    inet_bind2_bucket.v6_rcv_saddr.
  tcp: Save address type in inet_bind2_bucket.
  tcp: Rename tb in inet_bind2_bucket_(init|create)().
  tcp: Link bhash2 to bhash.
  tcp: Rearrange tests in inet_csk_bind_conflict().
  tcp: Iterate tb->bhash2 in inet_csk_bind_conflict().
  tcp: Check hlist_empty(&tb->bhash2) instead of
    hlist_empty(&tb->owners).

tcp: Unlink sk from bhash.
tcp: Link sk and twsk to tb2->owners using skc_bind_node.
tcp: Remove dead code and fields for bhash2.

 include/net/inet_hashtables.h    | 21 +++----
 include/net/inet_timewait_sock.h |  4 --
 include/net/ipv6.h               |  5 --
 include/net/sock.h               | 14 -----
 net/ipv4/inet_connection_sock.c  | 73 +++++++++++-------------
 net/ipv4/inet_diag.c             |  2 +-
 net/ipv4/inet_hashtables.c       | 98 +++++++++++++++-----------------
 net/ipv4/inet_timewait_sock.c    | 21 +------
 8 files changed, 92 insertions(+), 146 deletions(-)
Signature · 1 line
2.30.2