From 96ba3fc35fbb13a94cd355f1ca76a4f04bc72062 Mon Sep 17 00:00:00 2001 From: kml Date: Tue, 9 Feb 1999 02:15:45 +0000 Subject: [PATCH] defopt SB_MAX, which controls the maximum allowable size of socket buffers --- sys/conf/files | 4 +++- sys/sys/socketvar.h | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 9c71baf497a9..e433bb88a2f2 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.271 1999/02/07 09:34:58 jonathan Exp $ +# $NetBSD: files,v 1.272 1999/02/09 02:15:45 kml Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -70,6 +70,8 @@ defopt TCP_COMPAT_42 defopt TCP_RECVSPACE defopt TCP_SENDSPACE +defopt SB_MAX + # these are not together so that turning on UVMHIST only affects files that # use it, not most of the kernel defopt opt_uvm.h UVM diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index c0bf631e826c..fc715e922ace 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: socketvar.h,v 1.33 1999/01/20 09:15:42 mycroft Exp $ */ +/* $NetBSD: socketvar.h,v 1.34 1999/02/09 02:15:45 kml Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993 @@ -43,6 +43,8 @@ #ifndef _KERNEL struct uio; + +#include "opt_sb_max.h" #endif TAILQ_HEAD(soqhead, socket); @@ -97,7 +99,11 @@ struct socket { short sb_flags; /* flags, see below */ short sb_timeo; /* timeout for read/write */ } so_rcv, so_snd; + +#ifndef SB_MAX #define SB_MAX (256*1024) /* default for max chars in sockbuf */ +#endif + #define SB_LOCK 0x01 /* lock on data queue */ #define SB_WANT 0x02 /* someone is waiting to lock */ #define SB_WAIT 0x04 /* someone is waiting for data/space */