Merge branch 'net-inet-retire-port-only-listening_hash'
Martin KaFai Lau says:
====================
net: inet: Retire port only listening_hash
This series is to retire the port only listening_hash.
The listen sk is currently stored in two hash tables,
listening_hash (hashed by port) and lhash2 (hashed by port and address).
After commit
3c32c26ce3f2 ("net: tcp6: prefer listeners bound to an address")
and commit
3ce8b1280ab2 ("net: tcp: prefer listeners bound to an address"),
the TCP-SYN lookup fast path does not use listening_hash.
The commit
b67d2d2b60c7 ("tcp: seq_file: Replace listening_hash with lhash2")
also moved the seq_file (/proc/net/tcp) iteration usage from
listening_hash to lhash2.
There are still a few listening_hash usages left.
One of them is inet_reuseport_add_sock() which uses the listening_hash
to search a listen sk during the listen() system call. This turns
out to be very slow on use cases that listen on many different
VIPs at a popular port (e.g. 443). [ On top of the slowness in
adding to the tail in the IPv6 case ]. A latter patch has a
selftest to demonstrate this case.
This series takes this chance to move all remaining listening_hash
usages to lhash2 and then retire listening_hash.
====================
Link: https://lore.kernel.org/r/20220512000546.188616-1-kafai@fb.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>