From owner-freebsd-net@FreeBSD.ORG Fri Nov 14 11:23:04 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 10F4716A4CE for ; Fri, 14 Nov 2003 11:23:04 -0800 (PST) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 403BA43FAF for ; Fri, 14 Nov 2003 11:23:03 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.9/8.12.3) with ESMTP id hAEJMwOT014749; Fri, 14 Nov 2003 11:22:58 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.9/8.12.3/Submit) id hAEJMwEE014746; Fri, 14 Nov 2003 11:22:58 -0800 Date: Fri, 14 Nov 2003 11:22:58 -0800 From: Brooks Davis To: John Polstra Message-ID: <20031114192258.GD28455@Odin.AC.HMC.Edu> References: <20031114184700.GC28455@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EY/WZ/HvNxOox07X" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu 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 19:23:04 -0000 --EY/WZ/HvNxOox07X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 14, 2003 at 10:53:55AM -0800, John Polstra wrote: > On 14-Nov-2003 Brooks Davis wrote: > >=20 > > 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. >=20 > 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. I suggested the balanced tree because we've got two implementations in sys/tree.h, but you are correct that the space probably isn't worth the overhead of the trees. You'd have to use per physical interface trees anyway, so that part would be the same. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --EY/WZ/HvNxOox07X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/tSuQXY6L6fI4GtQRAisYAJ48TiJjeeMm2Wyd4tpQhuU5q6xg1gCgkJPD aJwpoqSPe3Hzz0ltYvhSHYQ= =ZCHr -----END PGP SIGNATURE----- --EY/WZ/HvNxOox07X--