Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Feb 2008 15:32:17 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no>
Cc:        arch@freebsd.org
Subject:   Re: dev.* analogue for interfaces
Message-ID:  <20080219233217.GS27248@funkthat.com>
In-Reply-To: <86odacc04t.fsf@ds4.des.no>
References:  <86odacc04t.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080219233217.GS27248>