summaryrefslogtreecommitdiffstats
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1997-03-03 09:23:37 +0000
committerdg <dg@FreeBSD.org>1997-03-03 09:23:37 +0000
commit1e7a910ca151c2606d05de7a8b9fa8d216282613 (patch)
tree077e9d6952606940594f8dc5a8bee133d9194994 /sys/netinet/raw_ip.c
parent43ee6e62202714fbafd263ea7d2b9f482ece532c (diff)
downloadFreeBSD-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/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index e290c5e..7f50216 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)raw_ip.c 8.7 (Berkeley) 5/15/95
- * $Id: raw_ip.c,v 1.41 1997/02/13 19:46:45 wollman Exp $
+ * $Id: raw_ip.c,v 1.42 1997/02/18 20:46:29 wollman Exp $
*/
#include <sys/param.h>
@@ -93,7 +93,7 @@ rip_init()
* to allocate a one entry hash list than it is to check all
* over the place for hashbase == NULL.
*/
- ripcbinfo.hashbase = phashinit(1, M_PCB, &ripcbinfo.hashsize);
+ ripcbinfo.hashbase = hashinit(1, M_PCB, &ripcbinfo.hashmask);
}
static struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET };
OpenPOWER on IntegriCloud