From owner-freebsd-stable Mon Jul 1 12:32:48 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12FDA37B400 for ; Mon, 1 Jul 2002 12:32:44 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51CB743E09 for ; Mon, 1 Jul 2002 12:32:43 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id PAA01647; Mon, 1 Jul 2002 15:32:42 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g61JWCb22225; Mon, 1 Jul 2002 15:32:12 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15648.44604.483273.242176@grasshopper.cs.duke.edu> Date: Mon, 1 Jul 2002 15:32:12 -0400 (EDT) To: Don Bowman Cc: "'freebsd-stable@freebsd.org'" Subject: RE: number mbufs / cluster In-Reply-To: References: X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Don Bowman writes: > > Andrew Gallatin wrote: > ... > > > I tried changing MCLSHIFT to 10. Although this would seem like > > > the right thing to do, some trouble ensues... Some things like nfs > > > don't seem to work right (just UDP traffic as far as I could see). > > > (10 would yield a 1K cluster). Are there > > > any assumptions somewhere that a cluster is >= MTU size? > > > > Possibly. What nic driver are you using? > > bge on a broadcom BCM5701. I may also end up using an 'em'. Both drivers assume that MCLBYTES > MTU. This is a reasonable assumption, as MCLSHIFT is not a "user servicable part". If you want to hack bge to work with 1K clusters, you'll need to alter at least newbuf_std to attach another cluster to the chain and figure out how to attach 2 buffers to the std ring. The first part is easy. Good luck on the latter ;) I assume you'll have similar problems in em, but I haven't looked. How big are the packets you're talking about? If they are less than MHLEN, it might be easier to hack bge_rxeof to copy data out of the clusters into mbufs. In fact, if you had reason to beleive it would pay to use 1K clusters, you might want to try this hack after increasing MSIZE to 1024. /sys/$ARCH/include/param.h > I've made another discovery (I think), that the amount of memory > is dramatically different when ipfw is used. Makes sense. I have no ipfw fu though. Perhaps somebody else can tell you how to limit its queue size. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message