From owner-cvs-all@FreeBSD.ORG Thu Dec 9 15:26:47 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCAC516A4CE for ; Thu, 9 Dec 2004 15:26:47 +0000 (GMT) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id F03A043D66 for ; Thu, 9 Dec 2004 15:26:46 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 86132 invoked from network); 9 Dec 2004 15:16:32 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.53]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 9 Dec 2004 15:16:32 -0000 Message-ID: <41B86EBA.BF6E2856@freebsd.org> Date: Thu, 09 Dec 2004 16:26:50 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Ruslan Ermilov References: <200412061902.iB6J2hJ6000543@repoman.freebsd.org> <20041206224339.GB51442@ip.net.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: cvs-src@freebsd.org cc: Gleb Smirnoff cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/netinet in_gif.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2004 15:26:48 -0000 Ruslan Ermilov wrote: > > On Mon, Dec 06, 2004 at 07:02:43PM +0000, Gleb Smirnoff wrote: > > glebius 2004-12-06 19:02:43 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/netinet in_gif.c > > Log: > > - Make route cacheing optional, configurable via IFF_LINK0 flag. > > - Turn it off by default. > > > > Requested by: many > > Reviewed by: andre > > Approved by: julian (mentor) > > MFC after: 3 days > > > > Revision Changes Path > > 1.27 +6 -0 src/sys/netinet/in_gif.c > > > This looks suboptimal. In the !IFF_LINK0 case, I suggest > not messing with sc->gif_ro at all and passing ip_output() > a NULL route pointer. Loop detection here is incomplete, > and the correct detection is already done in if_gif.c. > Other route checks just duplicate existing functionality. > > By the way, I have a WIP (attached) that adds versioning > to the routing table. Whenever a routing table is altered, > the version is bumped. The primary intent is for cached > routes, and it was invented specifically to address this > gif(4) problem, but also the remnants of PR kern/10778. Route caching at the consumers of the route API is evil and should be avoided. If there is any caching it should be in or managed by the route lookup function in one central place. This also helps to avoid concurrency and locking issues. IMO this is the only way to go and where I want to end up in a not too distant future. -- Andre