diff options
author | jhay <jhay@FreeBSD.org> | 1996-11-24 08:25:48 +0000 |
---|---|---|
committer | jhay <jhay@FreeBSD.org> | 1996-11-24 08:25:48 +0000 |
commit | dd3198090d6d3cba6dde6c0b837e9a3c069f4664 (patch) | |
tree | f01ae1841769e910cbc5a8300f2999cb868f2e50 /sys/netipx | |
parent | a0fbeb3c0782ffa56c01fc7c4e5b1a82c914005d (diff) | |
download | FreeBSD-src-dd3198090d6d3cba6dde6c0b837e9a3c069f4664.zip FreeBSD-src-dd3198090d6d3cba6dde6c0b837e9a3c069f4664.tar.gz |
Enlarge the transmit and receive bufferspace of ipx. Make it tweakable
with sysctl.
Diffstat (limited to 'sys/netipx')
-rw-r--r-- | sys/netipx/ipx_pcb.h | 6 | ||||
-rw-r--r-- | sys/netipx/ipx_usrreq.c | 20 |
2 files changed, 19 insertions, 7 deletions
diff --git a/sys/netipx/ipx_pcb.h b/sys/netipx/ipx_pcb.h index 8dd167b..19eaac0 100644 --- a/sys/netipx/ipx_pcb.h +++ b/sys/netipx/ipx_pcb.h @@ -33,7 +33,7 @@ * * @(#)ipx_pcb.h * - * $Id: ipx_pcb.h,v 1.4 1995/11/04 09:03:16 julian Exp $ + * $Id: ipx_pcb.h,v 1.5 1995/11/24 12:25:10 bde Exp $ */ #ifndef _NETIPX_IPX_PCB_H_ @@ -75,8 +75,8 @@ struct ipxpcb { /* * Nominal space allocated to a IPX socket. */ -#define IPXSNDQ 2048 -#define IPXRCVQ 2048 +#define IPXSNDQ 16384 +#define IPXRCVQ 40960 #ifdef KERNEL extern struct ipxpcb ipxpcb; /* head of list */ diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c index 6474975..9746f47 100644 --- a/sys/netipx/ipx_usrreq.c +++ b/sys/netipx/ipx_usrreq.c @@ -33,12 +33,13 @@ * * @(#)ipx_usrreq.c * - * $Id: ipx_usrreq.c,v 1.6 1996/04/13 14:37:22 jhay Exp $ + * $Id: ipx_usrreq.c,v 1.7 1996/05/08 19:31:48 jhay Exp $ */ #include <sys/param.h> #include <sys/queue.h> #include <sys/systm.h> +#include <sys/kernel.h> #include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/protosw.h> @@ -46,6 +47,7 @@ #include <sys/socketvar.h> #include <sys/errno.h> #include <sys/stat.h> +#include <sys/sysctl.h> #include <net/if.h> #include <net/route.h> @@ -65,6 +67,13 @@ int noipxRoute; +int ipxsendspace = IPXSNDQ; +SYSCTL_INT(_net_ipx_ipx, OID_AUTO, ipxsendspace, CTLFLAG_RW, + &ipxsendspace, 0, ""); +int ipxrecvspace = IPXRCVQ; +SYSCTL_INT(_net_ipx_ipx, OID_AUTO, ipxrecvspace, CTLFLAG_RW, + &ipxrecvspace, 0, ""); + /* * This may also be called for raw listeners. */ @@ -268,9 +277,11 @@ ipx_output(ipxp, m0) } ipxp->ipxp_lastdst = ipx->ipx_dna; #endif /* ancient_history */ - if (noipxRoute) ro = 0; + if (noipxRoute) + ro = 0; return (ipx_outputfl(m, ro, so->so_options & SO_BROADCAST)); } + /* ARGSUSED */ int ipx_ctloutput(req, so, level, name, value) @@ -418,7 +429,7 @@ ipx_usrreq(so, req, m, nam, control) error = ipx_pcballoc(so, &ipxpcb); if (error) break; - error = soreserve(so, (u_long) 2048, (u_long) 2048); + error = soreserve(so, ipxsendspace, ipxrecvspace); if (error) break; break; @@ -550,6 +561,7 @@ release: m_freem(m); return (error); } + /*ARGSUSED*/ int ipx_raw_usrreq(so, req, m, nam, control) @@ -572,7 +584,7 @@ ipx_raw_usrreq(so, req, m, nam, control) error = ipx_pcballoc(so, &ipxrawpcb); if (error) break; - error = soreserve(so, (u_long) 2048, (u_long) 2048); + error = soreserve(so, ipxsendspace, ipxrecvspace); if (error) break; ipxp = sotoipxpcb(so); |