Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Dec 2001 10:34:55 +0200
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Bill Fenner <fenner@research.att.com>, Garrett Wollman <wollman@FreeBSD.org>
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>
In-Reply-To: <200112040151.RAA00166@windsor.research.att.com>
References:  <200112011348.fB1DmGf07402@freefall.freebsd.org> <200112012051.fB1KpAp47152@khavrinen.lcs.mit.edu> <20011203114032.C60143@sunbay.com> <200112040151.RAA00166@windsor.research.att.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011204103455.B26925>