Split single TCP inpcb table into IPv4 and IPv6 parts.
authorbluhm <bluhm@openbsd.org>
Fri, 12 Apr 2024 16:07:09 +0000 (16:07 +0000)
committerbluhm <bluhm@openbsd.org>
Fri, 12 Apr 2024 16:07:09 +0000 (16:07 +0000)
commit93536db294f52bc74669089161e04f33a62520f5
tree8c0db80ad680de905fdfd83779ddffb73249eda0
parentbf87c3c07c3ad89262e2b8cae09f17e70aa9e1ee
Split single TCP inpcb table into IPv4 and IPv6 parts.

With two separate TCP hash tables, each one becomes smaller.  When
we remove the exclusive net lock from TCP, contention on internet
PCB table mutex will be reduced.  UDP has been split earlier into
IPv4 and IPv6.  Replace branch conditions based on INP_IPV6 with
assertions.

OK mvs@
sys/kern/kern_sysctl.c
sys/net/pf.c
sys/netinet/in_pcb.c
sys/netinet/tcp_input.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h
sys/netinet/udp_usrreq.c
sys/netinet6/in6_pcb.c