From owner-p4-projects@FreeBSD.ORG Tue May 12 06:24:44 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 46AE91065678; Tue, 12 May 2009 06:24:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0272C1065674; Tue, 12 May 2009 06:24:44 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id AB3D48FC15; Tue, 12 May 2009 06:24:43 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id n4C6NRBJ016437; Tue, 12 May 2009 01:23:28 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id n4C6NRx8016436; Tue, 12 May 2009 01:23:27 -0500 (CDT) (envelope-from brooks) Date: Tue, 12 May 2009 01:23:27 -0500 From: Brooks Davis To: Marko Zec Message-ID: <20090512062327.GA16196@lor.one-eyed-alien.net> References: <200905082144.n48LiKYP021818@repoman.freebsd.org> <20090509191540.GA85588@lor.one-eyed-alien.net> <200905110405.32580.zec@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: <200905110405.32580.zec@freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Tue, 12 May 2009 01:23:28 -0500 (CDT) Cc: Brooks Davis , Perforce Change Reviews Subject: Re: PERFORCE change 161793 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 06:24:45 -0000 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 11, 2009 at 04:05:32AM +0200, Marko Zec wrote: > On Saturday 09 May 2009 21:15:41 Brooks Davis wrote: > > On Fri, May 08, 2009 at 09:44:20PM +0000, Marko Zec wrote: > > > http://perforce.freebsd.org/chv.cgi?CH=3D161793 > > > > > > Change 161793 by zec@zec_tpx32 on 2009/05/08 21:43:51 > > > > > > A controversial hack: when allocating if_unit numbers for > > > cloning ifnets, do NOT resort to bitmap mappings, but > > > iterate through all existing ifnets in a particular vnet > > > as long as a free unit number is found. > > > > > > The problem here is that we are switchng from a O(n) to > > > a O(n**2) search method with more work being done in each > > > iteration. So this should be revisited RSN. > > > > IMO the best solution for now is to retain the global namespace and > > thus not worry about virtualizing this any more than we do for em0. >=20 > It's not that simple - don't forget that we need to have lo0 in each vnet= due=20 > to expectations from various userland applications. Moreover, users of= =20 > cloning ifnets would expect to get (as an example) vlan0, vlan1, vlan2 wh= en=20 > issuing ifconfig vlan create, not vlan539, vlan1, vlan123 etc. The same = goes=20 > for tunneling interfaces, ng_eiface, ng_iface etc. I think the general= =20 > principle behind vimage / vnets was not to allow for any information leak= ages=20 > between the isolated contexts, and retaining global namespace for cloning= =20 > ifnets would significantly violate that principle. lo0 will need to be an exception, but I'd be inclined to only violate name uniqueness in that case. I agree that there is a longterm argument that vimage instances should look like stand alone machines in the areas that are virtualized, but at this stage of the 8.0 I think we're much better off not attempting to find all the possible edge cases. > > This must not make it in to current since if it did, users with tunnel > > brokers would be very unhappy. >=20 > Precisely for the sake of tunnel brokers, I think each vnet should have i= ts=20 > own namespace for cloning devices - and this has nothing to do with "em0"= or=20 > any other physical ifnet which does not use the if_clone infrastructure. = I=20 > agree that the O(n**2) code for searching for free ifunits should not get= =20 > commited into svn, but Julian and I already discussed how we could virtua= lize=20 > the existing O(n) bitmapped algorithm in if_clone.c, and will try to subm= it=20 Tunnel brokers mostly likely won't care AT ALL what name the interfaces have. They will case that performance will be terrible due to the n^2 algorithm. -- Brooks >=20 > Marko >=20 --ikeVEW9yuYc//A+q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFKCRXdXY6L6fI4GtQRAiUSAKDMaQx/i2JPNx1zIczBRbWLvON4BQCeNLaP Id+cuGDuyaUzME763kncfEw= =H0/L -----END PGP SIGNATURE----- --ikeVEW9yuYc//A+q--