From owner-freebsd-arch@FreeBSD.ORG Tue Sep 30 10:48:25 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 CFAB516A4BF; Tue, 30 Sep 2003 10:48:25 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id C674D43FE9; Tue, 30 Sep 2003 10:48:24 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.9/8.12.3) with ESMTP id h8UHmKDH024717; Tue, 30 Sep 2003 10:48:20 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.9/8.12.3/Submit) id h8UHmKua024715; Tue, 30 Sep 2003 10:48:20 -0700 Date: Tue, 30 Sep 2003 10:48:19 -0700 From: Brooks Davis To: John Baldwin Message-ID: <20030930174815.GC31908@Odin.AC.HMC.Edu> References: <11374.1064934514@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="96YOpH+ONegL0A3E" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu cc: arch@freebsd.org cc: Poul-Henning Kamp cc: net@freebsd.org 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 17:48:26 -0000 --96YOpH+ONegL0A3E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 30, 2003 at 01:14:39PM -0400, John Baldwin wrote: >=20 > Fair enough. I think that Brooks planned to use a NULL device_t for > interfaces w/o a backing new-bus device. However, that means you > still need if_name for all the non-newbus devices, so this seems > somewhat pointless if if_name is the only reason. Another counterpoint > is that the new-bus namespace and the netif namespace aren't the same > anyway and that seemed to be the point of this linkage. The > dev_t <> softc <> device_t linkages aren't about unifying namespaces. The idea here is that virtually all uses of if_name/if_unit that aren't just there for the users benefit are actually references to the underlying driver not name of the interface. Currently they are the same (i.e. ifname is nearly always device_get_name(dev) or a bug prone manual version there of), but I would like to separate them so we can rename interfaces. Since device_t is as close to a repository of driver/instance information as we've got, I though using it would be a reasonable way to go. As a side benefit, most drivers have a copy of it in their softc already so you'd have a standard place to put it. I suppose a usable alternative would be to revive if_name and if_unit as something like if_drvname and if_drvunit. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --96YOpH+ONegL0A3E Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/ecHeXY6L6fI4GtQRAoM3AKCoaXbVJIwWuCegOL01REpap2jrfwCgiNiO vPGLE0NwLisRNtuK8jp0e2g= =S9HB -----END PGP SIGNATURE----- --96YOpH+ONegL0A3E--