From owner-cvs-all Tue Dec 4 0:35:29 2001 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 7CEAE37B419; Tue, 4 Dec 2001 00:35:16 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id fB48Ytv30442; Tue, 4 Dec 2001 10:34:55 +0200 (EET) (envelope-from ru) Date: Tue, 4 Dec 2001 10:34:55 +0200 From: Ruslan Ermilov To: Bill Fenner , Garrett Wollman Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet ip_mroute.c ip_output.c Message-ID: <20011204103455.B26925@sunbay.com> References: <200112011348.fB1DmGf07402@freefall.freebsd.org> <200112012051.fB1KpAp47152@khavrinen.lcs.mit.edu> <20011203114032.C60143@sunbay.com> <200112040151.RAA00166@windsor.research.att.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200112040151.RAA00166@windsor.research.att.com> User-Agent: Mutt/1.3.23i 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, Dec 03, 2001 at 05:51:36PM -0800, Bill Fenner wrote: > > ru said: > >On Sat, Dec 01, 2001 at 03:51:10PM -0500, Garrett Wollman wrote: > >> I think this fix is a bug. I want to require all callers of > >> ip_output() to already have either a route or an interface (iff > >> routing is disabled). > > > >Actually, I just followed the BSD/OS, NetBSD and OpenBSD here > > You also followed FreeBSD's rev 1.35 (apr 18, 1996). I think > Garrett was trying to say that he committed rev 1.36 for a reason. > Err, off by one error above -- Garrett actually committed rev. 1.35 with this log, in particular: : 1) Require all callers to pass a valid route pointer to ip_output() : so that we don't have to check and allocate one off the stack : as was done before. This eliminates one test and some stack : bloat from the common (UDP and TCP) case. This change did not eliminate "one test" actually, as the test was still done, and in the case of a match ip_output() just panic()ed. The change did eliminate "some stack bloat" by not allocating ``struct route'' off the stack. But see how reverting this change now doesn't affect the stack allocation in the IPSEC case. A simple solution to this (if threading is not a concern) would be to make this structure static. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message