dev.* analogue for interfaces

Dag-Erling Smørgrav des at des.no
Wed Feb 20 12:42:49 UTC 2008


John-Mark Gurney <jmg at funkthat.com> writes:
> My concern is that slowly adding them for each interface type could
> create some conflicts in both naming and location...

each interface type?  this would be done in if_attach() / if_detach(),
everything is taken care of centrally for all interfaces.

> Are the interface sysctl nodes going to be the same/mirrored for hardware
> devices?  Does dev.msk.0 get duplicated in the interface area?

No, there's if.* for interface stuff and dev.* for hardware stuff.  Some
nodes might move from one tree to the other, but I suspect that most
won't.  Like I said, some interfaces already do this "manually" under
net.*.

> 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?

Not all interfaces are devices.  That is the whole point...

> 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...

Uh, no.

Devices that aren't backed by hardware are still devices, they still
have a device_t, and they still have dev.* nodes; nexus is not backed by
hardware, for instance, it's just a convenient top-level device that
serves as parent for all other devices.

Basically, there is a dev.* node for every device_t in the system.

I want to have an if.* node for every struct ifnet.

> This will help enforce non-conflicting names,

I don't see why you're so hung up on conflicting names.  It's a non-
issue.  Every interface has a unique name.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-arch mailing list