netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 00/12] tcp: Refactor bhash2 and remove sk_bind2_node.
@ 2023-12-13  8:20 Kuniyuki Iwashima
  2023-12-13  8:20 ` [PATCH v2 net-next 01/12] tcp: Use bhash2 for v4-mapped-v6 non-wildcard address Kuniyuki Iwashima
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Kuniyuki Iwashima @ 2023-12-13  8:20 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	David Ahern
  Cc: Kuniyuki Iwashima, Kuniyuki Iwashima, netdev

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.

After this series, bhash is a wrapper of bhash2:

  tb
  `-> tb2 -> tb2 -> ...
      `-> sk -> sk -> sk ....


Changes:
  v2:
    * 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/20231023190255.39190-1-kuniyu@amazon.com/


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(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-12-19  0:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13  8:20 [PATCH v2 net-next 00/12] tcp: Refactor bhash2 and remove sk_bind2_node Kuniyuki Iwashima
2023-12-13  8:20 ` [PATCH v2 net-next 01/12] tcp: Use bhash2 for v4-mapped-v6 non-wildcard address Kuniyuki Iwashima
2023-12-15 14:03   ` Eric Dumazet
2023-12-13  8:20 ` [PATCH v2 net-next 02/12] tcp: Rearrange tests in inet_bind2_bucket_(addr_match|match_addr_any)() Kuniyuki Iwashima
2023-12-13  8:20 ` [PATCH v2 net-next 03/12] tcp: Save v4 address as v4-mapped-v6 in inet_bind2_bucket.v6_rcv_saddr Kuniyuki Iwashima
2023-12-15 15:43   ` Eric Dumazet
2023-12-13  8:20 ` [PATCH v2 net-next 04/12] tcp: Save address type in inet_bind2_bucket Kuniyuki Iwashima
2023-12-13  8:20 ` [PATCH v2 net-next 05/12] tcp: Rename tb in inet_bind2_bucket_(init|create)() Kuniyuki Iwashima
2023-12-13  8:20 ` [PATCH v2 net-next 06/12] tcp: Link bhash2 to bhash Kuniyuki Iwashima
2023-12-13  8:20 ` [PATCH v2 net-next 07/12] tcp: Rearrange tests in inet_csk_bind_conflict() Kuniyuki Iwashima
2023-12-13  8:20 ` [PATCH v2 net-next 08/12] tcp: Iterate tb->bhash2 " Kuniyuki Iwashima
2023-12-13  8:20 ` [PATCH v2 net-next 09/12] tcp: Check hlist_empty(&tb->bhash2) instead of hlist_empty(&tb->owners) Kuniyuki Iwashima
2023-12-13  8:20 ` [PATCH v2 net-next 10/12] tcp: Unlink sk from bhash Kuniyuki Iwashima
2023-12-13  8:20 ` [PATCH v2 net-next 11/12] tcp: Link sk and twsk to tb2->owners using skc_bind_node Kuniyuki Iwashima
2023-12-13  8:20 ` [PATCH v2 net-next 12/12] tcp: Remove dead code and fields for bhash2 Kuniyuki Iwashima
2023-12-19  0:01 ` [PATCH v2 net-next 00/12] tcp: Refactor bhash2 and remove sk_bind2_node Jakub Kicinski
2023-12-19  0:12   ` Kuniyuki Iwashima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).