mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00

This test populates the bhash table for a given port with MAX_THREADS * MAX_CONNECTIONS sockets, and then times how long a bind request on the port takes. When populating the bhash table, we create the sockets and then bind the sockets to the same address and port (SO_REUSEADDR and SO_REUSEPORT are set). When timing how long a bind on the port takes, we bind on a different address without SO_REUSEPORT set. We do not set SO_REUSEPORT because we are interested in the case where the bind request does not go through the tb->fastreuseport path, which is fragile (eg tb->fastreuseport path does not work if binding with a different uid). To run the script: Usage: ./bind_bhash.sh [-6 | -4] [-p port] [-a address] 6: use ipv6 4: use ipv4 port: Port number address: ip address Without any arguments, ./bind_bhash.sh defaults to ipv6 using ip address "2001:0db8:0:f101::1" on port 443. On my local machine, I see: ipv4: before - 0.002317 seconds with bhash2 - 0.000020 seconds ipv6: before - 0.002431 seconds with bhash2 - 0.000021 seconds Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
43 lines
590 B
Text
43 lines
590 B
Text
# SPDX-License-Identifier: GPL-2.0-only
|
|
ipsec
|
|
msg_zerocopy
|
|
socket
|
|
psock_fanout
|
|
psock_snd
|
|
psock_tpacket
|
|
stress_reuseport_listen
|
|
reuseport_addr_any
|
|
reuseport_bpf
|
|
reuseport_bpf_cpu
|
|
reuseport_bpf_numa
|
|
reuseport_dualstack
|
|
reuseaddr_conflict
|
|
tcp_mmap
|
|
udpgso
|
|
udpgso_bench_rx
|
|
udpgso_bench_tx
|
|
tcp_inq
|
|
tls
|
|
txring_overwrite
|
|
ip_defrag
|
|
ipv6_flowlabel
|
|
ipv6_flowlabel_mgr
|
|
so_txtime
|
|
tcp_fastopen_backup_key
|
|
nettest
|
|
fin_ack_lat
|
|
reuseaddr_ports_exhausted
|
|
hwtstamp_config
|
|
rxtimestamp
|
|
timestamping
|
|
txtimestamp
|
|
so_netns_cookie
|
|
test_unix_oob
|
|
gro
|
|
ioam6_parser
|
|
toeplitz
|
|
tun
|
|
cmsg_sender
|
|
unix_connect
|
|
tap
|
|
bind_bhash
|