summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1996-10-07 19:06:12 +0000
committerdg <dg@FreeBSD.org>1996-10-07 19:06:12 +0000
commit00503a161c79ade0719914a9a6702edb1b8cf4ce (patch)
treedae846038cd15c3157337180a5522bad5b374630 /sys/netinet/tcp_usrreq.c
parent1d8ea9950b98ea0cc0979fcc4630afb5ba994f6e (diff)
downloadFreeBSD-src-00503a161c79ade0719914a9a6702edb1b8cf4ce.zip
FreeBSD-src-00503a161c79ade0719914a9a6702edb1b8cf4ce.tar.gz
Improved in_pcblookuphash() to support wildcarding, and changed relavent
callers of it to take advantage of this. This reduces new connection request overhead in the face of a large number of PCBs in the system. Thanks to David Filo <filo@yahoo.com> for suggesting this and providing a sample implementation (which wasn't used, but showed that it could be done). Reviewed by: wollman
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 78f8acf..e38d8c2 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94
- * $Id: tcp_usrreq.c,v 1.24 1996/07/12 17:28:47 davidg Exp $
+ * $Id: tcp_usrreq.c,v 1.25 1996/09/13 23:51:44 pst Exp $
*/
#include <sys/param.h>
@@ -857,7 +857,7 @@ tcp_connect(tp, nam)
error = in_pcbladdr(inp, nam, &ifaddr);
if (error)
return error;
- oinp = in_pcblookup(inp->inp_pcbinfo->listhead,
+ oinp = in_pcblookuphash(inp->inp_pcbinfo,
sin->sin_addr, sin->sin_port,
inp->inp_laddr.s_addr != INADDR_ANY ? inp->inp_laddr
: ifaddr->sin_addr,
OpenPOWER on IntegriCloud