Date: Thu, 25 Sep 2003 16:12:23 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: net@freebsd.org Subject: proposal adding device_t* to struct if_net Message-ID: <20030925231223.GA19202@Odin.AC.HMC.Edu>
next in thread | raw e-mail | index | archive | help
--17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'd like to propose that we add a device_t pointer to struct if_net. It would be defined to contain either a pointer to the device associated with this interface or NULL (pseudo-interfaces and interfaces without access to a device_t in their attach routine (COMPAT_OLDISA devices) will have NULL pointers). The motivation for this change is that currently we make the assumption that there is a one to one mapping between if_name values and device drivers (if the interface actually has a physical device associated with it). Three drivers rely on this as do administrators looking at ifconfig output. The current plan is to replace if_name and if_unit with if_xname and to allow the interface to be renamed by the administrator removing any tie between interface names and hardware. The three drivers relying on if_name need to be fixed before if_xname can go in and having a way for administrators to map interfaces to hardware would be useful once renaming is possible. Does anyone see any major problems with doing this? My main concern is that this could have locking implications. -- Brooks P.S. The main example of driver abuse of if_name is in sys/dev/mii/brgphy.c near lines 203 and 617. --=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 --17pEHd4RhPHOinZp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/c3ZWXY6L6fI4GtQRAtz7AJwKnYVOPgri2jpTSOZxumQlSGb4DACg1SEL QKfdN75A4LSlZm0mfiQaF5c= =jB7t -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030925231223.GA19202>