Date: Tue, 23 Sep 2003 15:15:30 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: dfr@nlsystems.com Cc: arch@freebsd.org Subject: Re: kobj multiple inheritance Message-ID: <20030923.151530.84357823.imp@bsdimp.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <1064305850.68463.67.camel@herring.nlsystems.com> Doug Rabson <dfr@nlsystems.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030923.151530.84357823.imp>