From owner-freebsd-arch@FreeBSD.ORG Fri Oct 3 18:44:30 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 C35C716A4C0 for ; Fri, 3 Oct 2003 18:44:30 -0700 (PDT) Received: from smtp.noos.fr (nan-smtp-06.noos.net [212.198.2.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2930543F3F for ; Fri, 3 Oct 2003 18:44:27 -0700 (PDT) (envelope-from root@noos.fr) Received: (qmail 58386434 invoked by uid 0); 4 Oct 2003 00:59:35 -0000 Received: (qmail 59857497 invoked by uid 0); 2 Oct 2003 07:46:28 -0000 Received: from unknown (HELO mx2.freebsd.org) ([216.136.204.119]) (envelope-sender ) by 212.198.2.75 (qmail-ldap-1.03) with SMTP for ; 2 Oct 2003 07:46:28 -0000 Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 27E11566DB; Thu, 2 Oct 2003 00:45:59 -0700 (PDT) (envelope-from owner-freebsd-net@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 959ED16A4EC; Thu, 2 Oct 2003 00:45:57 -0700 (PDT) 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 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-net@freebsd.org Errors-To: owner-freebsd-net@freebsd.org cc: arch@freebsd.org cc: net@freebsd.org Subject: Re: adding if_dev member to struct ifnet X-BeenThere: freebsd-arch@freebsd.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2003 01:44:31 -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 _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"