From owner-freebsd-net@FreeBSD.ORG Fri Nov 14 10:53:57 2003 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 61B4916A4D0 for ; Fri, 14 Nov 2003 10:53:57 -0800 (PST) Received: from blake.polstra.com (dsl081-189-066.sea1.dsl.speakeasy.net [64.81.189.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A4CA43FA3 for ; Fri, 14 Nov 2003 10:53:56 -0800 (PST) (envelope-from jdp@polstra.com) Received: from strings.polstra.com (dsl081-189-067.sea1.dsl.speakeasy.net [64.81.189.67]) by blake.polstra.com (8.12.9p2/8.12.9) with ESMTP id hAEIrt8b049072; Fri, 14 Nov 2003 10:53:56 -0800 (PST) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20031114184700.GC28455@Odin.AC.HMC.Edu> Date: Fri, 14 Nov 2003 10:53:55 -0800 (PST) From: John Polstra To: Brooks Davis X-Bogosity: No, tests=bogofilter, spamicity=0.499775, version=0.14.5 cc: freebsd-net@freebsd.org Subject: Re: what about 5000 .. 10000 VLANs in one system? 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: Fri, 14 Nov 2003 18:53:57 -0000 On 14-Nov-2003 Brooks Davis wrote: > > I think is should work, but performance may be poor. Currently, > vlan_input() finds the correct vlan by searching the list of all vlans > until it finds the correct one. For that many vlans, it might be > necessicary to modify the code to use some form of balanced tree instead > of a simple list. This should be fairly straight forward to fix. Why not simply index directly into an array of 4096 pointers? Anybody running that many VLANs can afford the extra 16 kB per physical interface. John