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/udp_usrreq.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/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 801d93a..56a84ac 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95 - * $Id: udp_usrreq.c,v 1.34 1997/02/18 20:46:36 wollman Exp $ + * $Id: udp_usrreq.c,v 1.35 1997/02/24 20:31:25 wollman Exp $ */ #include <sys/param.h> @@ -99,7 +99,7 @@ udp_init() { LIST_INIT(&udb); udbinfo.listhead = &udb; - udbinfo.hashbase = phashinit(UDBHASHSIZE, M_PCB, &udbinfo.hashsize); + udbinfo.hashbase = hashinit(UDBHASHSIZE, M_PCB, &udbinfo.hashmask); } void |