From owner-freebsd-current Mon Nov 29 8:51:12 1999 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 00E9B15181 for ; Mon, 29 Nov 1999 08:51:08 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id IAA27910; Mon, 29 Nov 1999 08:51:07 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id IAA01330; Mon, 29 Nov 1999 08:51:07 -0800 (PST) (envelope-from jdp@polstra.com) Date: Mon, 29 Nov 1999 08:51:07 -0800 (PST) Message-Id: <199911291651.IAA01330@vashon.polstra.com> To: dillon@apollo.backplane.com Subject: Re: Route table leaks In-Reply-To: <199911280243.SAA40107@apollo.backplane.com> References: <199911220150.UAA78559@khavrinen.lcs.mit.edu> <199911221552.KAA84691@khavrinen.lcs.mit.edu> <199911270141.RAA29416@vashon.polstra.com> <199911280243.SAA40107@apollo.backplane.com> Organization: Polstra & Co., Seattle, WA Cc: current@freebsd.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <199911280243.SAA40107@apollo.backplane.com>, Matthew Dillon wrote: > :1. Do I really need the splnet calls around RTFREE? > > Yes. Because the route table may be flushed from an interrupt in > a low memory situation. I guess I didn't state the question very well. I realize that RTFREE has to be executed at splnet. But I think it's likely that rtalloc and rtalloc_ign are always called at splnet or better. If that's the case and it's already required, then adding the redundant splnet calls would be obfuscatory. I'd rather add a comment instead. > :2. To eliminate all the duplicated code, shall I make rtalloc just > :call rtalloc_ign(ro, 0UL)? I assume that was avoided originally for > :performance reasons, but now there's more code than before. > : > Hmm. One trick I used in the VM code was to put the common code in an > inline static function and leave the external functions broken out to > avoid an unnecessary call chain. OK, that's a possibility. I was hoping our network-meister (Yo, Garrett!) would give me a sign as to whether it would be worthwhile or not. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "No matter how cynical I get, I just can't keep up." -- Nora Ephron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message