summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.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/udp_usrreq.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/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 56a84ac..fe1a8fc 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.35 1997/02/24 20:31:25 wollman Exp $
+ * $Id: udp_usrreq.c,v 1.36 1997/03/03 09:23:37 davidg Exp $
*/
#include <sys/param.h>
@@ -435,8 +435,8 @@ udp_output(inp, m, addr, control)
ui->ui_sum = 0xffff;
}
((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len;
- ((struct ip *)ui)->ip_ttl = inp->inp_ip.ip_ttl; /* XXX */
- ((struct ip *)ui)->ip_tos = inp->inp_ip.ip_tos; /* XXX */
+ ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */
+ ((struct ip *)ui)->ip_tos = inp->inp_ip_tos; /* XXX */
udpstat.udps_opackets++;
error = ip_output(m, inp->inp_options, &inp->inp_route,
inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST),
@@ -497,7 +497,7 @@ udp_attach(struct socket *so, int proto)
error = soreserve(so, udp_sendspace, udp_recvspace);
if (error)
return error;
- ((struct inpcb *) so->so_pcb)->inp_ip.ip_ttl = ip_defttl;
+ ((struct inpcb *) so->so_pcb)->inp_ip_ttl = ip_defttl;
return 0;
}
OpenPOWER on IntegriCloud