From owner-freebsd-net@FreeBSD.ORG Tue May 18 16:12:09 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DBF116A4F8; Tue, 18 May 2004 16:12:09 -0700 (PDT) Received: from pit.databus.com (p70-227.acedsl.com [66.114.70.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 257DF440C6; Tue, 18 May 2004 15:49:58 -0700 (PDT) (envelope-from barney@pit.databus.com) Received: from pit.databus.com (localhost [127.0.0.1]) by pit.databus.com (8.12.11/8.12.11) with ESMTP id i4IMlbNg024761; Tue, 18 May 2004 18:47:37 -0400 (EDT) (envelope-from barney@pit.databus.com) Received: (from barney@localhost) by pit.databus.com (8.12.11/8.12.11/Submit) id i4IMlbS7024760; Tue, 18 May 2004 18:47:37 -0400 (EDT) (envelope-from barney) Date: Tue, 18 May 2004 18:47:37 -0400 From: Barney Wolff To: Vincent Jardin Message-ID: <20040518224737.GA24171@pit.databus.com> References: <20040518092439.GF845@darkness.comp.waw.pl> <20040518024346.A5068@xorpc.icir.org> <20040518100503.GG845@darkness.comp.waw.pl> <200405182020.28286.vjardin@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200405182020.28286.vjardin@free.fr> User-Agent: Mutt/1.5.6i X-Scanned-By: MIMEDefang 2.43 cc: Luigi Rizzo cc: Pawel Jakub Dawidek cc: freebsd-net@freebsd.org Subject: Re: ia_netbroadcast X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2004 23:12:14 -0000 On Tue, May 18, 2004 at 08:20:26PM +0200, Vincent Jardin wrote: > > +> This said, how do you plan to handle the alias search, by > > +> implementing a per-interface hash table containing the > > +> addresses and broadcast addresses ? > > > > First I want to find all places that need fast processing and it probably > > needs hash tables for IPs and broadcasts, but I'm not sure if that's all. > >Why not a lookup using Patricia ? It is very efficient, moreover it is already > provided by net/radix.c Well, no. A trie is very efficient when the problem is to match an address with an addr/mask pair. For matching on equality, hashing is far better. -- Barney Wolff http://www.databus.com/bwresume.pdf I'm available by contract or FT, in the NYC metro area or via the 'Net.