From owner-freebsd-net@FreeBSD.ORG Wed Sep 24 03:37:07 2008 Return-Path: Delivered-To: net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46506106567B for ; Wed, 24 Sep 2008 03:37:07 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from proxy.meer.net (proxy.meer.net [64.13.141.13]) by mx1.freebsd.org (Postfix) with ESMTP id 23D7E8FC21 for ; Wed, 24 Sep 2008 03:37:07 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mail.meer.net (mail.meer.net [64.13.141.3]) by proxy.meer.net (8.14.2/8.14.2) with ESMTP id m8O3b6ob038074; Tue, 23 Sep 2008 20:37:06 -0700 (PDT) (envelope-from gnn@neville-neil.com) Received: from mail2.meer.net (mail2.meer.net [64.13.141.16]) by mail.meer.net (8.13.3/8.13.3/meer) with ESMTP id m8O3Zw1Y073320; Tue, 23 Sep 2008 20:35:58 -0700 (PDT) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (cpe-68-175-68-135.nyc.res.rr.com [68.175.68.135]) (authenticated bits=0) by mail2.meer.net (8.14.1/8.14.1) with ESMTP id m8O3Zvd3020150; Tue, 23 Sep 2008 20:35:58 -0700 (PDT) (envelope-from gnn@neville-neil.com) Date: Tue, 23 Sep 2008 23:35:57 -0400 Message-ID: From: gnn@FreeBSD.org To: Ruslan Ermilov In-Reply-To: <20080923201718.GA88008@edoofus.dev.vega.ru> References: <20080923201718.GA88008@edoofus.dev.vega.ru> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.2.50 (i386-apple-darwin9.4.0) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Canit-CHI2: 0.50 X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-Spam-Score: 0.10 () [Tag at 5.00] COMBINED_FROM X-CanItPRO-Stream: default X-Canit-Stats-ID: 1659036 - d9fe76fee2d5 X-Scanned-By: CanIt (www . roaringpenguin . com) on 64.13.141.13 Cc: net@FreeBSD.org Subject: Re: Proposed patch, convert IFQ_MAXLEN to kernel tunable... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2008 03:37:07 -0000 At Wed, 24 Sep 2008 00:17:18 +0400, Ruslan Ermilov wrote: > > Hi, > > On Tue, Sep 23, 2008 at 03:29:06PM -0400, gnn@freebsd.org wrote: > > It turns out that the last time anyone looked at this constant was > > before 1994 and it's very likely time to turn it into a kernel > > tunable. On hosts that have a high rate of packet transmission > > packets can be dropped at the interface queue because this value is > > too small. Rather than make a sweeping code change I propose the > > following change to the macro and updating a couple of places in the > > IP and IPv6 stacks that were using this macro to set their own global > > variables. > > > > I have tested this in my test lab at work, it is not as yet in > > production at my day job, but will be soon. > > > It's not that bad -- most modern Ethernet drivers initialize interface > input queues themselves, and don't depend on IFQ_MAXLEN. The IPv4 > input queue is tunable via net.inet.ip.intr_queue_maxlen. The IPv6 > queue can similarly be made tunable. I agree that ifqmaxlen can be > made tunable because there's still a lot of (mostly for old hardware) > drivers that use ifqmaxlen and IFQ_MAXLEN, but I'm against changing > the definition of IFQ_MAXLEN. Imagine some code like this: > Sorry, this is about the output queue, not the input queue. Though there are both input and output queues that depend on this. > void *x[IFQ_MAXLEN]; // here it's 50 > > And some function that does: > > for (i = 0; i < IFQ_MAXLEN; i++) { // not necessarily 50 > x[i] = NULL; > } > I found no occurrences of the above in our code base. I used cscope to search all of src/sys. Are you aware of any occurrences of this? Best, George