summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1997-04-03 05:14:45 +0000
committerdg <dg@FreeBSD.org>1997-04-03 05:14:45 +0000
commit3913f72826062a29e3639b65feb86391e7b95f4e (patch)
tree9545f8a4208243eb8a2fb0174ccac502f1597e86 /sys/netinet/in_pcb.c
parentb33b19313452a78950f97db79a75fcd82412e9f7 (diff)
downloadFreeBSD-src-3913f72826062a29e3639b65feb86391e7b95f4e.zip
FreeBSD-src-3913f72826062a29e3639b65feb86391e7b95f4e.tar.gz
Reorganize elements of the inpcb struct to take better advantage of
cache lines. Removed the struct ip proto since only a couple of chars were actually being used in it. Changed the order of compares in the PCB hash lookup to take advantage of partial cache line fills (on PPro). Discussed-with: wollman
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r--sys/netinet/in_pcb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 81409ce..d7136aa 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
- * $Id: in_pcb.c,v 1.28 1997/03/03 09:23:33 davidg Exp $
+ * $Id: in_pcb.c,v 1.29 1997/03/24 11:24:50 bde Exp $
*/
#include <sys/param.h>
@@ -688,8 +688,9 @@ in_pcblookuphash(pcbinfo, faddr, fport_arg, laddr, lport_arg, wildcard)
head = &pcbinfo->hashbase[INP_PCBHASH(faddr.s_addr, lport, fport, pcbinfo->hashmask)];
for (inp = head->lh_first; inp != NULL; inp = inp->inp_hash.le_next) {
if (inp->inp_faddr.s_addr == faddr.s_addr &&
- inp->inp_fport == fport && inp->inp_lport == lport &&
- inp->inp_laddr.s_addr == laddr.s_addr)
+ inp->inp_laddr.s_addr == laddr.s_addr &&
+ inp->inp_fport == fport &&
+ inp->inp_lport == lport)
goto found;
}
if (wildcard) {
OpenPOWER on IntegriCloud