freebsd-nq/sys/netinet
David Greenman c3229e05a3 Improved connection establishment performance by doing local port lookups via
a hashed port list. In the new scheme, in_pcblookup() goes away and is
replaced by a new routine, in_pcblookup_local() for doing the local port
check. Note that this implementation is space inefficient in that the PCB
struct is now too large to fit into 128 bytes. I might deal with this in the
future by using the new zone allocator, but I wanted these changes to be
extensively tested in their current form first.

Also:
1) Fixed off-by-one errors in the port lookup loops in in_pcbbind().
2) Got rid of some unneeded rehashing. Adding a new routine, in_pcbinshash()
   to do the initialial hash insertion.
3) Renamed in_pcblookuphash() to in_pcblookup_hash() for easier readability.
4) Added a new routine, in_pcbremlists() to remove the PCB from the various
   hash lists.
5) Added/deleted comments where appropriate.
6) Removed unnecessary splnet() locking. In general, the PCB functions should
   be called at splnet()...there are unfortunately a few exceptions, however.
7) Reorganized a few structs for better cache line behavior.
8) Killed my TCP_ACK_HACK kludge. It may come back in a different form in
   the future, however.

These changes have been tested on wcarchive for more than a month. In tests
done here, connection establishment overhead is reduced by more than 50
times, thus getting rid of one of the major networking scalability problems.

Still to do: make tcp_fastimo/tcp_slowtimo scale well for systems with a
large number of connections. tcp_fastimo is easy; tcp_slowtimo is difficult.

WARNING: Anything that knows about inpcb and tcpcb structs will have to be
         recompiled; at the very least, this includes netstat(1).
1998-01-27 09:15:13 +00:00
..
libalias Fixed a missing #include in the synopsis. 1998-01-16 13:02:58 +00:00
fil.c Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
icmp_var.h Some staticized variables were still declared to be extern. 1997-09-07 05:27:26 +00:00
if_atm.c Make INET a proper option. 1998-01-08 23:42:31 +00:00
if_atm.h import Chuck Cranor's ATM driver 1997-05-09 07:48:14 +00:00
if_ether.c Make INET a proper option. 1998-01-08 23:42:31 +00:00
if_ether.h Make INET a proper option. 1998-01-08 23:42:31 +00:00
if_fddi.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
igmp_var.h Some staticized variables were still declared to be extern. 1997-09-07 05:27:26 +00:00
igmp.c Last major round (Unless Bruce thinks of somthing :-) of malloc changes. 1997-10-12 20:26:33 +00:00
igmp.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
in_cksum.c Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
in_hostcache.c Remove a bunch of variables which were unused both in GENERIC and LINT. 1997-11-07 08:53:44 +00:00
in_hostcache.h Add for public examination the beginnings of the per-host cache support 1997-06-18 01:24:28 +00:00
in_pcb.c Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
in_pcb.h Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
in_proto.c Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h. 1997-12-15 20:31:25 +00:00
in_rmx.c Removed unused #includes. 1997-08-02 14:33:27 +00:00
in_systm.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
in_var.h Some staticized variables were still declared to be extern. 1997-09-07 05:27:26 +00:00
in.c Last major round (Unless Bruce thinks of somthing :-) of malloc changes. 1997-10-12 20:26:33 +00:00
in.h Export ipstat via sysctl. Don't understand why this wasn't done before. 1997-09-25 00:34:35 +00:00
ip_auth.c Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_auth.h Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_compat.h Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_divert.c Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
ip_fil.c Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_fil.h Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_frag.c Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_frag.h Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_ftp_pxy.c Import version 3.2alpha7 1997-05-25 15:50:46 +00:00
ip_fw.c Make INET a proper option. 1998-01-08 23:42:31 +00:00
ip_fw.h Bump up packet and byte counters to 64-bit unsigned ints. As a 1998-01-08 03:03:54 +00:00
ip_icmp.c ICMP Timestamp Request messages could have harbored the same sort of 1997-08-25 16:29:27 +00:00
ip_icmp.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
ip_input.c Make the BOOTP family new-style options (in opt_bootp.h) 1998-01-09 03:21:07 +00:00
ip_log.c Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_mroute.c Removed unused #includes. 1997-10-28 15:59:26 +00:00
ip_mroute.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
ip_nat.c Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_nat.h Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_output.c Rename some local variables to avoid shadowing other local variables. 1997-11-07 09:21:01 +00:00
ip_proxy.c Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_proxy.h Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_state.c Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_state.h Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
ip_var.h Some staticized variables were still declared to be extern. 1997-09-07 05:27:26 +00:00
ip.h Removed a stale comment. (We don't declare ip_len and ip_offset as 1997-12-19 23:33:08 +00:00
ipl.h Import version 3.2alpha7 1997-05-25 15:50:46 +00:00
mlf_ipl.c Import kernel parts of ipfilter-3.2.1 1997-11-16 05:55:52 +00:00
mln_ipl.c Import version 3.2alpha7 1997-05-25 15:50:46 +00:00
raw_ip.c Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
tcp_debug.c Make INET a proper option. 1998-01-08 23:42:31 +00:00
tcp_debug.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tcp_fsm.h Fix all areas of the system (or at least all those in LINT) to avoid storing 1997-08-16 19:16:27 +00:00
tcp_input.c Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
tcp_output.c Don't allow the window to be increased beyond what is possible to 1997-10-07 21:10:06 +00:00
tcp_reass.c Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
tcp_seq.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tcp_subr.c Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
tcp_timer.c Make TCP_COMPAT_42 a new style option. 1998-01-25 04:23:33 +00:00
tcp_timer.h Some staticized variables were still declared to be extern. 1997-09-07 05:27:26 +00:00
tcp_timewait.c Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
tcp_usrreq.c Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
tcp_var.h Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
tcp.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
tcpip.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00
udp_usrreq.c Improved connection establishment performance by doing local port lookups via 1998-01-27 09:15:13 +00:00
udp_var.h Some staticized variables were still declared to be extern. 1997-09-07 05:27:26 +00:00
udp.h Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not 1997-02-22 09:48:43 +00:00