From owner-cvs-all Sun Jun 3 19:46:24 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 8065C37B401; Sun, 3 Jun 2001 19:46:15 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id MAA26346; Mon, 4 Jun 2001 12:46:02 +1000 Date: Mon, 4 Jun 2001 12:44:24 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Jesper Skriver Cc: Warner Losh , Michael Harnois , 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 In-Reply-To: <20010604022840.A50666@skriver.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 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