Skip to content

bhash2 binding table fixups

Joanne Koong netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 8 repliesIn review
  2. v22 patches 15 repliesSuperseded

v2 from the cover letter

https://lore.kernel.org/netdev/[email protected]/
* Add a patch that adds bhash2 hashbucket locks

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: Update bhash2 when socket's rcv saddr changesinclude/net/inet_hashtables.h include/net/ipv6.h net/dccp/ipv4.c +6 more+97 -181 reply
2/3net: Add bhash2 hashbucket locksinclude/net/inet_hashtables.h net/dccp/proto.c net/ipv4/inet_connection_sock.c +2 more+107 -1077 replies
3/3selftests/net: Add sk_bind_sendto_listen testtools/testing/selftests/net/.gitignore tools/testing/selftests/net/Makefile tools/testing/selftests/net/sk_bind_sendto_listen.c+84 -00 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchEric Dumazet
1/3R-b
2/3
3/3

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

Read the v3 thread

Cover letter [PATCH net-next v3 0/3] bhash2 binding table fixups

There are two fix-ups related to the bhash2 binding table in this patchset:

1) Fixes an inconsistency in the bhash2 table in the case where a socket's rcv saddr changes after it is binded.

2) Fixes the case where the bhash2 hashbucket is accessed concurrently by sockets that hash to different bhash hashbuckets. To address this, the bhash2 hashbucket has its own lock.

--
v2 -> v3:
v2:
https://lore.kernel.org/netdev/[email protected]/
* Add a patch that adds bhash2 hashbucket locks

v1 -> v2:
v1:
https://lore.kernel.org/netdev/[email protected]/
* Mark __inet_bhash2_update_saddr as static

Joanne Koong (3):
net: Update bhash2 when socket's rcv saddr changes
net: Add bhash2 hashbucket locks selftests/net: Add sk_bind_sendto_listen test

 include/net/inet_hashtables.h                 |  31 +++--
 include/net/ipv6.h                            |   2 +-
 net/dccp/ipv4.c                               |  10 +-
 net/dccp/ipv6.c                               |   4 +-
 net/dccp/proto.c                              |   3 +-
 net/ipv4/af_inet.c                            |   7 +-
 net/ipv4/inet_connection_sock.c               |  60 +++++----
 net/ipv4/inet_hashtables.c                    | 115 +++++++++++++-----
 net/ipv4/tcp.c                                |   7 +-
 net/ipv4/tcp_ipv4.c                           |   8 +-
 net/ipv6/inet6_hashtables.c                   |   4 +-
 net/ipv6/tcp_ipv6.c                           |   4 +-
 tools/testing/selftests/net/.gitignore        |   1 +
 tools/testing/selftests/net/Makefile          |   1 +
 .../selftests/net/sk_bind_sendto_listen.c     |  82 +++++++++++++
 15 files changed, 251 insertions(+), 88 deletions(-)
 create mode 100644 tools/testing/selftests/net/sk_bind_sendto_listen.c
Signature · 1 line
2.30.2