From owner-freebsd-net@FreeBSD.ORG Thu Oct 2 00:45:23 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 870C716A4B3; Thu, 2 Oct 2003 00:45:23 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9F5543FBD; Thu, 2 Oct 2003 00:45:21 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h927jH627125; Thu, 2 Oct 2003 09:45:18 +0200 (MEST) Date: Thu, 2 Oct 2003 09:45:17 +0200 (CEST) From: Harti Brandt To: Brooks Davis In-Reply-To: <20031001164036.GA1263@Odin.AC.HMC.Edu> Message-ID: <20031002093437.S11328@beagle.fokus.fraunhofer.de> References: <20030930174815.GC31908@Odin.AC.HMC.Edu> <20031001093334.S113@beagle.fokus.fraunhofer.de> <20031001164036.GA1263@Odin.AC.HMC.Edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@freebsd.org cc: net@freebsd.org Subject: Re: adding if_dev member to struct ifnet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2003 07:45:23 -0000 On Wed, 1 Oct 2003, Brooks Davis wrote: BD>On Wed, Oct 01, 2003 at 09:34:22AM +0200, Harti Brandt wrote: BD>> On Tue, 30 Sep 2003, Brooks Davis wrote: BD>> BD>> BD>All are within other code. One example is in dev/mii/brgphy.c which a BD>> BD>phy feature is not enabled when it is attached to some MACs. A messier BD>> BD>example is in the new ATM code where interfaces are looked up by name. BD>> BD>> Where is this? BD> BD>One example would be in sys/netatm/atm_if.c around line 1081. Well, that's the old ATM code (HARP). An this place is not a problem, because HARP physical interfaces live in their own name space - they don't have a struct ifnet. A worse example is around line 1125. But, I suppose we could just use the usual way to lookup an interface via it's name and after that check that it is an HARP nif. A more serious problem is how HARP allocates NIFs: the user specifies a prefix and a number N. HARP then generates interfaces with names from prefix0 to prefixN. This is the only place, where HARP really needs a name and a unit number, but this is only to create a name for new interfaces - the names are not parsed after that, so it should be no problem to keep this stuff, except that we stuff the complete name into if_xname. All the other uses of if_name seem to be (...."%s%d", if_name, if_unit)... harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org