Date: Mon, 4 Jun 2001 12:44:24 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Jesper Skriver <jesper@skriver.dk> Cc: Warner Losh <imp@village.org>, Michael Harnois <mdharnois@home.com>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_accf.c uipc_mbuf.c uipc_socket2.c src/sys/netinet ip_input.c src/sys/netinet6 in6_proto.c src/sys/sys param.h Message-ID: <Pine.BSF.4.21.0106041219410.53715-100000@besplex.bde.org> In-Reply-To: <20010604022840.A50666@skriver.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 4 Jun 2001, Jesper Skriver wrote: > On Mon, Jun 04, 2001 at 09:56:45AM +1000, Bruce Evans wrote: > > On Fri, 1 Jun 2001, Jesper Skriver wrote: > > > > Bummer, I don't have time to fix it right now (probably put it in > > > > a new .h file), so I'll back it out for now, and have a second go > > > > when I have more time. > > > > > > http://people.FreeBSD.org/~jesper/opt_param.diff > > > > > > Should fix this, it moved NMBCLUSTERS back to > > > src/sys/kern/uipc_mbuf.c, revert <sys/param.h> to the old version, > > > and sets the default value for net.inet.ip.maxfragpackets and > > > net.inet6.ip6.maxfragpackets to 200 instead of NMBCLUSTERS/4 > > > > I think you want it to be (nmbclusters / 4) > > Yes, but the initial value for a sysctl has to be a constant, or > atleast it won't compile unless it is, You mean that the value returned by a SYSCTL_INT() can't be an expression; it must be either `val' or `*ptr'. SYSCTL_PROC() can return almost anything, but is more than is needed here. > Andrew Gallatin has > suggested something like > > SYSINIT(frag, SI_SUB_MBUF, SI_ORDER_ANY, nfraginit, NULL) > > static void > nfraginit(void *dummy) > { > ip_nfragpackets = nmbclusters/4; > } > > Which I need to read more on and understand, so for now I > committed it with a fixed default value of 200. This is more or less what I meant. I don't like SYSINIT() and would put the initialization in a suitable existing initialization routine if there is one. ip_input() seems to be suitable. It already initializes maxnipq to nmbclusters/4. Don't forget to fix the style bug (missing spaces around binary operator). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0106041219410.53715-100000>