From owner-freebsd-net@FreeBSD.ORG Tue May 18 02:43:48 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 BE7BF16A4CE; Tue, 18 May 2004 02:43:48 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1D5643D60; Tue, 18 May 2004 02:43:46 -0700 (PDT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i4I9hkgd005161; Tue, 18 May 2004 02:43:46 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i4I9hkof005160; Tue, 18 May 2004 02:43:46 -0700 (PDT) (envelope-from rizzo) Date: Tue, 18 May 2004 02:43:46 -0700 From: Luigi Rizzo To: Pawel Jakub Dawidek Message-ID: <20040518024346.A5068@xorpc.icir.org> References: <20040518092439.GF845@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040518092439.GF845@darkness.comp.waw.pl>; from pjd@freebsd.org on Tue, May 18, 2004 at 11:24:39AM +0200 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 09:43:48 -0000 On Tue, May 18, 2004 at 11:24:39AM +0200, Pawel Jakub Dawidek wrote: > Hi. > > Do we still need ia_netboradcast field? It is calculated depending on > old-fashion classes (A, B, C). Is it used still? > I wonder if ia_broadaddr isn't sufficient today. not just that, it seems that ia_netboradcast contains bogus info. This said, how do you plan to handle the alias search, by implementing a per-interface hash table containing the addresses and broadcast addresses ? cheers luigi > IP netmask ia_broadaddr ia_netbroadcast > 10.0.0.101 255.0.0.0 10.255.255.255 10.255.255.255 > 1.0.0.2 255.255.255.252 1.0.0.3 1.255.255.255 > 2.0.0.1 255.255.0.0 2.0.255.255 2.255.255.255 > > I'm planing to work on removing O(n) from interface aliases search. > Now every incoming packet have to be compared with every single > broadcast from every single alias. When I tested something and > there were ~10000 aliases on interface it worked really slow. > > This slowdown probably exists in more places. It exists in NetBSD and > OpenBSD as well. > > -- > Pawel Jakub Dawidek http://www.FreeBSD.org > pjd@FreeBSD.org http://garage.freebsd.pl > FreeBSD committer Am I Evil? Yes, I Am!