summaryrefslogtreecommitdiffstats
path: root/sys/netinet/raw_ip.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/raw_ip.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/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 7f50216..1e3a35d 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.42 1997/02/18 20:46:29 wollman Exp $
+ * $Id: raw_ip.c,v 1.43 1997/03/03 09:23:35 davidg Exp $
*/
#include <sys/param.h>
@@ -114,7 +114,7 @@ rip_input(m, iphlen)
ripsrc.sin_addr = ip->ip_src;
for (inp = ripcb.lh_first; inp != NULL; inp = inp->inp_list.le_next) {
- if (inp->inp_ip.ip_p && inp->inp_ip.ip_p != ip->ip_p)
+ if (inp->inp_ip_p && inp->inp_ip_p != ip->ip_p)
continue;
if (inp->inp_laddr.s_addr &&
inp->inp_laddr.s_addr != ip->ip_dst.s_addr)
@@ -187,7 +187,7 @@ rip_output(m, so, dst)
ip = mtod(m, struct ip *);
ip->ip_tos = 0;
ip->ip_off = 0;
- ip->ip_p = inp->inp_ip.ip_p;
+ ip->ip_p = inp->inp_ip_p;
ip->ip_len = m->m_pkthdr.len;
ip->ip_src = inp->inp_laddr;
ip->ip_dst.s_addr = dst;
@@ -402,7 +402,7 @@ rip_attach(struct socket *so, int proto)
(error = in_pcballoc(so, &ripcbinfo)))
return error;
inp = (struct inpcb *)so->so_pcb;
- inp->inp_ip.ip_p = proto;
+ inp->inp_ip_p = proto;
return 0;
}
OpenPOWER on IntegriCloud