Skip to content

tcp: Add a 2nd listener hashtable (port+addr)

Martin KaFai Lau netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 2 repliesIn review
  2. v14 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Move the new lhash2 and lhash2_mask before the existing listening_hash to avoid adding another cacheline to inet_hashinfo (Suggested by Eric Dumazet, Thanks!)
- I take this chance to plug an existing 4 bytes hole while adding 'unsigned int lhash2_mask'.
- Add some comments about lhash2 in inet_hashtables.h

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4inet: Add a count to struct inet_listen_hashbucketinclude/net/inet_hashtables.h net/ipv4/inet_hashtables.c+10 -20 replies
2/4udp: Move udp[46]_portaddr_hash() to net/ip[v6].hinclude/net/ip.h include/net/ipv6.h net/ipv4/udp.c +1 more+42 -380 replies
3/4inet: Add a 2nd listener hashtable (port+addr)include/net/inet_connection_sock.h include/net/inet_hashtables.h net/ipv4/inet_hashtables.c +1 more+249 -151 reply
4/4tcp: Enable 2nd listener hashtable in TCPnet/ipv4/tcp.c+3 -00 replies

Reviews trailers per patch

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

PatchEric Dumazet
1/4R-b
2/4R-b
3/4R-b
4/4R-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 v2 net-next 0/4] tcp: Add a 2nd listener hashtable (port+addr)

This patch set adds a 2nd listener hashtable. It is to resolve the performance issue when a process is listening at many IP addresses with the same port (e.g. [IP1]:443, [IP2]:443... [IPN]:443)

v2:
- Move the new lhash2 and lhash2_mask before the existing listening_hash to avoid adding another cacheline to inet_hashinfo (Suggested by Eric Dumazet, Thanks!)
- I take this chance to plug an existing 4 bytes hole while adding 'unsigned int lhash2_mask'.
- Add some comments about lhash2 in inet_hashtables.h

Martin KaFai Lau (4):
inet: Add a count to struct inet_listen_hashbucket
udp: Move udp[46]_portaddr_hash() to net/ip[v6].h
inet: Add a 2nd listener hashtable (port+addr)
tcp: Enable 2nd listener hashtable in TCP

 include/net/inet_connection_sock.h |   2 +
 include/net/inet_hashtables.h      |  29 +++++--
 include/net/ip.h                   |   9 ++
 include/net/ipv6.h                 |  17 ++++
 net/ipv4/inet_hashtables.c         | 173 +++++++++++++++++++++++++++++++++++--
 net/ipv4/tcp.c                     |   3 +
 net/ipv4/udp.c                     |  22 ++---
 net/ipv6/inet6_hashtables.c        |  66 ++++++++++++++
 net/ipv6/udp.c                     |  32 ++-----
 9 files changed, 301 insertions(+), 52 deletions(-)
Signature · 1 line
2.9.5