Enlarge the transmit and receive bufferspace of ipx. Make it tweakable

with sysctl.
This commit is contained in:
John Hay 1996-11-24 08:25:48 +00:00
parent 31461d3a75
commit a5225c3f47
2 changed files with 19 additions and 7 deletions

View File

@ -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 */

View File

@ -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 @@ 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);