From owner-freebsd-arch@FreeBSD.ORG Mon Sep 29 23:45:11 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 4F3F116A4B3; Mon, 29 Sep 2003 23:45:11 -0700 (PDT) Received: from mwinf0603.wanadoo.fr (smtp3.wanadoo.fr [193.252.22.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E1BD43FA3; Mon, 29 Sep 2003 23:45:10 -0700 (PDT) (envelope-from vjardin@wanadoo.fr) Received: from venus.vincentjardin.net (AVelizy-102-1-2-196.w217-128.abo.wanadoo.fr [217.128.206.196]) by mwinf0603.wanadoo.fr (SMTP Server) with ESMTP id 8EE93240010C; Tue, 30 Sep 2003 08:45:08 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-1" From: Vincent Jardin To: Brooks Davis , arch@freebsd.org, net@freebsd.org Date: Tue, 30 Sep 2003 10:45:15 +0200 User-Agent: KMail/1.4.3 References: <20030930010327.GB31222@Odin.AC.HMC.Edu> In-Reply-To: <20030930010327.GB31222@Odin.AC.HMC.Edu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200309301045.15776.vjardin@wanadoo.fr> Subject: Re: adding if_dev member to struct ifnet X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2003 06:45:11 -0000 Le Mardi 30 Septembre 2003 03:03, Brooks Davis a =E9crit : > [Previously posted to -net in another form.] > > I propose to add an if_dev member to struct ifnet. It would be of type > device_t and be defined to point to the device for the interface or NUL= L > if there is no device (or if there was not an easy way to get access to > one). > > This change would codify the the relationship between an interface and > the underlying physical device. It also would get rid of the existing > abuses of if_name to look up the driver associated with an interface > and simplify a number of messy cases in the conversion from if_unit and > if_name to if_xname. > > Does this seem like a reasonable thing to do? Yes, if it helps to remove if_name/if_unit, it is a thing to do. Moreover= it=20 sounds a good idea to have the if_dev field into the ifnet structure. Regards, Vincent