diff options
author | pst <pst@FreeBSD.org> | 1996-09-19 00:54:36 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1996-09-19 00:54:36 +0000 |
commit | 59ab34c158aede507215c7d91314d593c571de8c (patch) | |
tree | 6c8805e0a60bcf51b28c35977794a4cf4ddcd02e /sys/kern/uipc_socket2.c | |
parent | ba02dd81ba2919a2ed6bc2b3b635aabf6c153a39 (diff) | |
download | FreeBSD-src-59ab34c158aede507215c7d91314d593c571de8c.zip FreeBSD-src-59ab34c158aede507215c7d91314d593c571de8c.tar.gz |
Add a new sysctl variable kern.sominqueue to override the MINIMUM queue
specified in a listen(2) system call.
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r-- | sys/kern/uipc_socket2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 1a79d87..0590034 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93 - * $Id: uipc_socket2.c,v 1.12 1996/07/11 16:31:59 wollman Exp $ + * $Id: uipc_socket2.c,v 1.13 1996/08/19 19:22:26 julian Exp $ */ #include <sys/param.h> @@ -60,6 +60,9 @@ static u_long sb_efficiency = 8; /* parameter for sbreserve() */ SYSCTL_INT(_kern, OID_AUTO, sockbuf_waste_factor, CTLFLAG_RW, &sb_efficiency, 0, ""); +static int sominqueue = 0; +SYSCTL_INT(_kern, KERN_SOMINQUEUE, sominqueue, CTLFLAG_RW, &sominqueue, 0, ""); + /* * Procedures to manipulate state flags of socket * and do appropriate wakeups. Normal sequence from the @@ -163,7 +166,8 @@ sonewconn1(head, connstatus) { register struct socket *so; - if (head->so_qlen > 3 * head->so_qlimit / 2) + if ((head->so_qlen > 3 * head->so_qlimit / 2) && + (head->so_qlen > sominqueue)) return ((struct socket *)0); MALLOC(so, struct socket *, sizeof(*so), M_SOCKET, M_DONTWAIT); if (so == NULL) |