From owner-freebsd-net@FreeBSD.ORG Wed Aug 22 14:38:26 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0194516A469 for ; Wed, 22 Aug 2007 14:38:26 +0000 (UTC) (envelope-from ivo.vachkov@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by mx1.freebsd.org (Postfix) with ESMTP id B138413C457 for ; Wed, 22 Aug 2007 14:38:25 +0000 (UTC) (envelope-from ivo.vachkov@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so21928anc for ; Wed, 22 Aug 2007 07:38:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FuFE2a0VeZtjNpw/93y+TNA4WJZJsi7ydpxLhBXXCi32zsgxBSrSV5toUtdMI3iirlwV908t836RW5PL4RJoOkjH6OHzTvO/qhIOg5s3vVtz9CYVNb88kbmnDNf7X5RKoiU1cXDeND2oogrsSFfyGqW4cuEb5GycLfznr4mpZ50= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=C4UrLYAjD6JCO3qmjyXCCX7UvbFkmcN/oo0Go1VloqPZoksjRrUr8lDhzWbq1sZP0dK7zDsYCuLbOKC6Ewgt9XJYKthQKvLPod8/mrFF9MZ/7edio2tyMb8bmtPdVx7VhOBpYLES6p1pwJsWnKqiE44o05nrKCaE7UKUCyAPyK0= Received: by 10.90.113.20 with SMTP id l20mr568440agc.1187793470181; Wed, 22 Aug 2007 07:37:50 -0700 (PDT) Received: by 10.90.119.18 with HTTP; Wed, 22 Aug 2007 07:37:50 -0700 (PDT) Message-ID: Date: Wed, 22 Aug 2007 17:37:50 +0300 From: "Ivo Vachkov" To: "Bruce M. Simpson" In-Reply-To: <46CC475F.8030505@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46CC475F.8030505@FreeBSD.org> Cc: freebsd-net Subject: Re: Route caching ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 14:38:26 -0000 Actually there is: struct route_in6 ip6_forward_rt; that "caches" the last route used (thanks blue !!!) but i think this technique is pointless in a multiflow traffic. Is it reasonable to believe that route caches can improve networking performance or we should leave it up to the routing table itself ? On 8/22/07, Bruce M. Simpson wrote: > Not really, at least, not in the way one would think. rtalloc() is a > legacy function. > > ip_output() will still call rtalloc() if you pass it a filled out > 'struct route', a structure which is not a route, but an internal > request to look up a route. > > This is a wrapper for rtalloc_ign(), which in turn is a wrapper for > rtalloc1(), the function which does the actual lookup. > > rtalloc_ign() is pretty straightforward. Note however that this approach > only checks the RTF_UP flag and ifp, nothing more. This makes it > suitable for implementing floating statics, but nothing more dynamic > than that. > > regards, > BMS > -- "UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." Dennis Ritchie