From owner-freebsd-arch@FreeBSD.ORG Tue Feb 19 23:44:31 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A7DD16A420 for ; Tue, 19 Feb 2008 23:44:31 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id BC93C13C43E for ; Tue, 19 Feb 2008 23:44:30 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (yj3h0xtt0vmrot7u@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id m1JNWIjP075119; Tue, 19 Feb 2008 15:32:18 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id m1JNWIQa075118; Tue, 19 Feb 2008 15:32:18 -0800 (PST) (envelope-from jmg) Date: Tue, 19 Feb 2008 15:32:17 -0800 From: John-Mark Gurney To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20080219233217.GS27248@funkthat.com> Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , arch@freebsd.org References: <86odacc04t.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86odacc04t.fsf@ds4.des.no> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (hydrogen.funkthat.com [127.0.0.1]); Tue, 19 Feb 2008 15:32:19 -0800 (PST) Cc: arch@freebsd.org Subject: Re: dev.* analogue for interfaces X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 23:44:31 -0000 Dag-Erling Smrgrav wrote this message on Tue, Feb 19, 2008 at 18:43 +0100: > Four years ago, I created the dev.* sysctl tree for device drivers. > Every time a device is registered, a sysctl context is automatically > created, and a node is created under dev (e.g. dev.cpu.0), with some > standardized nodes under it (%driver, %parent, %desc etc.) plus any node > the driver - or even another driver - wants to add. > > However, not everything in Unix is a device. Specifically, network > interfaces aren't. [...] > I'm open to objections and suggestions... My concern is that slowly adding them for each interface type could create some conflicts in both naming and location... Are the interface sysctl nodes going to be the same/mirrored for hardware devices? Does dev.msk.0 get duplicated in the interface area? or does it have to decide to put ethernet interface related items in the if sysctl node, and other hardware related (hi/low water marks for DMA) in the seperate tree? How does someone know where to look if they are in different locations for the same device? We should probably create a newbus tree node off the nexus for psuedo devices that are not backed by hardware, and put all of these style devices under them... This will help enforce non-conflicting names, and limit the number of locations where sysctl can be located for devices... This would mean that ifnet would/should grow a device_t and can either get stored w/ one provided in the hardware case, or one get automaticly created if one isn't provided... This would enable all psuedo devices to have a single location, and you not have to search to remeber, oh, there's net.if, dev., tty.if, disk., or some other set of random psuedo devices... I'm all for making it easier for devices to export configuration information, I just want to ensure that it's easy to find and locate, since documentation usually comes last... (I still need to write a man page for my bktrau device driver. :) ) -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."