From a5225c3f478a72f1695a1aa4f779671d3c90c103 Mon Sep 17 00:00:00 2001 From: John Hay Date: Sun, 24 Nov 1996 08:25:48 +0000 Subject: [PATCH] Enlarge the transmit and receive bufferspace of ipx. Make it tweakable with sysctl. --- sys/netipx/ipx_pcb.h | 6 +++--- 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 8dd167b4fbc5..19eaac06ceba 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 6474975746dc..9746f4764cf4 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 #include #include +#include #include #include #include @@ -46,6 +47,7 @@ #include #include #include +#include #include #include @@ -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 @@ ipx_usrreq(so, req, m, nam, control) 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);