From owner-freebsd-questions@FreeBSD.ORG Thu Jan 15 13:25:58 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD154106566B for ; Thu, 15 Jan 2009 13:25:58 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 8E2848FC19 for ; Thu, 15 Jan 2009 13:25:58 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 62BBC211571; Thu, 15 Jan 2009 08:06:30 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Thu, 15 Jan 2009 08:06:30 -0500 X-Sasl-enc: IzmbNV+XKk4Bi9thRDrV5t40pX01nKP+Ade67BaI4LH5 1232024790 Received: from empiric.lon.incunabulum.net (radius-82-150-131-239.dsdeurne.nl [82.150.131.239]) by mail.messagingengine.com (Postfix) with ESMTPSA id 1934FCA29; Thu, 15 Jan 2009 08:06:29 -0500 (EST) Message-ID: <496F34D2.7050605@FreeBSD.org> Date: Thu, 15 Jan 2009 13:06:26 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.19 (X11/20090107) MIME-Version: 1.0 To: Yony Yossef References: <20def4870901140009y1f007108y92797d5f79ffac08@mail.gmail.com> <496E11B7.3010608@sepehrs.com> <000b01c9768e$745aa160$220f000a@mtl.com> <496EF30E.4010304@sepehrs.com> <000c01c976ec$87e040b0$220f000a@mtl.com> In-Reply-To: <000c01c976ec$87e040b0$220f000a@mtl.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 15 Jan 2009 13:56:12 +0000 Cc: Liran Liss , freebsd-net@freebsd.org, Oleg Kats , "'H.fazaeli'" , Eitan Shefi , freebsd-questions@freebsd.org Subject: Re: howto determine network device unit number? device.hints? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2009 13:25:59 -0000 Yony Yossef wrote: > Thanks for the explanation. > > So there's no way to determine this in advance.. > I must build a script that contains my own mapping between MAC addresses and > the wanted interface names and run it after each driver load, rename the > interfaces if necessary. > It seems quite wrong, don't you agree? > > And how come the unit number is given an arbitrary value? Is there a good > reason for that? > Normally the PCI probe runs in the opposite direction from that of Linux. It's largely to do with how the NEWBUS code walks the PCI bus. From a systems management point of view, yeah, it's irritating, however it would probably take more effort (i.e. kernel code) to try to patch it to work differently, and not everyone has free time to sit down and patch the kernel. That and (unlike Solaris) there is no *direct* mapping between the card's driver number on the bus and its network driver number. In your case I'm not sure why your two cards would flip order. Could it be how your BIOS and hardware set up the PCI IDSEL lines at boot?