From owner-freebsd-arch@FreeBSD.ORG Tue Sep 23 14:15:34 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4587E16A4B3 for ; Tue, 23 Sep 2003 14:15:34 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id D881343FE0 for ; Tue, 23 Sep 2003 14:15:32 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9p1/8.12.3) with ESMTP id h8NLFUGA067802; Tue, 23 Sep 2003 15:15:31 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 23 Sep 2003 15:15:30 -0600 (MDT) Message-Id: <20030923.151530.84357823.imp@bsdimp.com> To: dfr@nlsystems.com From: "M. Warner Losh" In-Reply-To: <1064305850.68463.67.camel@herring.nlsystems.com> References: <1064266269.68463.42.camel@herring.nlsystems.com> <1494190000.1064269463@aslan.btc.adaptec.com> <1064305850.68463.67.camel@herring.nlsystems.com> X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: gibbs@scsiguy.com cc: arch@freebsd.org Subject: Re: kobj multiple inheritance X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 21:15:34 -0000 In message: <1064305850.68463.67.camel@herring.nlsystems.com> Doug Rabson writes: : Hmm. Some kind of SYSINIT-driven ivar index allocator, perhaps? I've logn thought this is an excellent idea. Have a 32 bit name space. 16 allocated to an interface and 16 that are private to that interface. That should be plenty of bits, and the read/write ivar routines would still be simple. Hide it behind a macro, and it doesn't matter the sizes. You'd change: switch (which) { case PCI_IVAR_ETHADDR: ... } to if (IVAR_SELECTOR(which) != pci_ivar) return (EIO); /* or pass it on? */ switch (IVAR_PRIVATE(which)) { case PCI_IVAR_ETHADDR: ... } Which isn't burdonsome at all. If you have more than 65,000 interfaces in the system, then you have bigger issues :-) Warner