From owner-freebsd-net@FreeBSD.ORG Wed Aug 22 14:38:28 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 9A7F916A4F0 for ; Wed, 22 Aug 2007 14:38:28 +0000 (UTC) (envelope-from ivo.vachkov@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.228]) by mx1.freebsd.org (Postfix) with ESMTP id 56E8913C474 for ; Wed, 22 Aug 2007 14:38:28 +0000 (UTC) (envelope-from ivo.vachkov@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so168985wxd for ; Wed, 22 Aug 2007 07:38:27 -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=HmQjeKCG73t7WuRtgkQVzxig2RB+RN1q1aIaCjYGFiF3XcEXzHE4Gzzrd3QHCXTka++XpA/ZvI16QJINlwxclOMp6cM/Vy24dX6fV0f7RUZFobM9S9K6MZCPPiFWK8TZZ9izDnWG88rlLZQaRANJmBjw2KaVlfZo/Q52WQhkrwM= 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=FsQRP8h9dRcbycbyswCd8q2XeUMxUgW7GYvZpVBG6n/mEDM6EADaNB8OtC2Cz6QKzRJ3QajpOmUvNBIjcWBdy+8y6iYY4FnsQ2atSbzorE9AikPDvMEWpASMUzjB/VHybDZl96u8iNwL/lBS3Uju2VMB4M3IadG6wGcDoshzL9I= Received: by 10.90.50.1 with SMTP id x1mr89492agx.1187793497173; Wed, 22 Aug 2007 07:38:17 -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:28 -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