diff options
author | dg <dg@FreeBSD.org> | 1997-03-03 09:23:37 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1997-03-03 09:23:37 +0000 |
commit | 1e7a910ca151c2606d05de7a8b9fa8d216282613 (patch) | |
tree | 077e9d6952606940594f8dc5a8bee133d9194994 /sys/netinet/tcp_timewait.c | |
parent | 43ee6e62202714fbafd263ea7d2b9f482ece532c (diff) | |
download | FreeBSD-src-1e7a910ca151c2606d05de7a8b9fa8d216282613.zip FreeBSD-src-1e7a910ca151c2606d05de7a8b9fa8d216282613.tar.gz |
Improved performance of hash algorithm while (hopefully) not reducing
the quality of the hash distribution. This does not fix a problem dealing
with poor distribution when using lots of IP aliases and listening
on the same port on every one of them...some other day perhaps; fixing
that requires significant code changes.
The use of xor was inspired by David S. Miller <davem@jenolan.rutgers.edu>
Diffstat (limited to 'sys/netinet/tcp_timewait.c')
-rw-r--r-- | sys/netinet/tcp_timewait.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 9f07fbc..f7b4469 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 - * $Id$ + * $Id: tcp_subr.c,v 1.34 1997/02/22 09:41:41 peter Exp $ */ #include <sys/param.h> @@ -107,7 +107,7 @@ tcp_init() tcp_cleartaocache(); LIST_INIT(&tcb); tcbinfo.listhead = &tcb; - tcbinfo.hashbase = phashinit(TCBHASHSIZE, M_PCB, &tcbinfo.hashsize); + tcbinfo.hashbase = hashinit(TCBHASHSIZE, M_PCB, &tcbinfo.hashmask); if (max_protohdr < sizeof(struct tcpiphdr)) max_protohdr = sizeof(struct tcpiphdr); if (max_linkhdr + sizeof(struct tcpiphdr) > MHLEN) |