From owner-freebsd-current@FreeBSD.ORG Thu Dec 4 21:25:14 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21A8D10656A7; Thu, 4 Dec 2008 21:25:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 921538FC2C; Thu, 4 Dec 2008 21:25:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mB4LOIOn033364; Thu, 4 Dec 2008 16:25:04 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Thu, 4 Dec 2008 14:38:27 -0500 User-Agent: KMail/1.9.7 References: <1d6d20bc0811260656t101ddb0eu35296ac973c6ba10@mail.gmail.com> <20081127195902.GA65404@alchemy.franken.de> In-Reply-To: <20081127195902.GA65404@alchemy.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812041438.27992.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 04 Dec 2008 16:25:04 -0500 (EST) X-Virus-Scanned: ClamAV 0.93.1/8721/Thu Dec 4 08:26:10 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Robert Watson , Jia-Shiun Li , Marius Strobl Subject: Re: if_le unit number change? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2008 21:25:14 -0000 On Thursday 27 November 2008 02:59:02 pm Marius Strobl wrote: > On Thu, Nov 27, 2008 at 09:36:48AM +0000, Robert Watson wrote: > > > > On Wed, 26 Nov 2008, Jia-Shiun Li wrote: > > > > >I use vmware to run freebsd. > > > > > >recent update of 8-current changed the unit number of the virtual network > > >interface, an emulated if_le. usually the unit number should start from 0 > > >,namely le0. But after updating the source, le0 becomes le1. This makes > > >interface name mismatching that in rc.conf. I checked the commit log but > > >there seems nothing related in sys/dev/le. So should this be caused by > > >something else? > > > > > >The kernels dated 11/5 & 11/26. > > > > Just ran into an identical problem with HEAD on VMWare here as well. It > > appears to work fine as le1, which is reassuring, but the unit numbering > > change is worrying. I may get a chance to do some binary searching today, > > but we'll see. > > > > I think the reason is that since r185059 the isa(4) hints (in this > case the default one for le0) are now also applied to acpi(4). > Even previously reserving the device unit number corresponding to > the hint (i.e. le0 for hint.le.0.at="isa") regardless of whether > it's actually present and enabled or not was the expected beaviour > AFAICT, although limited to the presence of a ISA bus. ISA hints were always applied to ACPI, but in odd ways. For example, if you had 'hint.sio.0.port=0x3f8' and 'hint.sio.0.flags=0x10' but ACPI's sio0 was actually at some other I/O port, it would still use the sio0 flags. The change now is that hints always "reserve" a device name/unit. If a bus driver determines that a set of hints matches a device it can self-enumerate (e.g. ACPI namespace or PNPBIOS), then it can let the self-enumerated device take over the "reserved" device name/unit. In effect, you can wire device name/units based on resources (only acpi(4) and isa(4) support this currently). I tend to trim my /boot/device.hints to remove hints for devices that aren't in my machines. However, with 8.0, if you leave the bogus hints around you won't be hurt and the device will stay as 'le1' so long as you don't remove the 'le0' hints, so if you never edit your /boot/device.hints it will just be called le1 forever. -- John Baldwin