Date: Thu, 21 Feb 2008 13:21:15 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Robert Watson <rwatson@FreeBSD.org> Cc: arch@freebsd.org, John-Mark Gurney <jmg@funkthat.com> Subject: Re: dev.* analogue for interfaces Message-ID: <8663wia4as.fsf@ds4.des.no> In-Reply-To: <20080221100156.V52922@fledge.watson.org> (Robert Watson's message of "Thu\, 21 Feb 2008 10\:07\:08 %2B0000 \(GMT\)") References: <86odacc04t.fsf@ds4.des.no> <20080219233217.GS27248@funkthat.com> <20080220111157.H44565@fledge.watson.org> <86ablvuzgx.fsf@ds4.des.no> <20080221100156.V52922@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson <rwatson@FreeBSD.org> writes: > Hmm. When I look at net/if.c, I don't see renaming support, so > perhaps this was just a proposal I was thinking of and not actual > code. no, it's there, check ifconfig(8) > In either case, I think the question stands: in a world where > interface renaming is supported, is your plan to also rename the if.X > sysctl tree created for the interface? Does sysctl have a facility to > do this? I will have to investigate. I think it can be arranged in some way. > I assume that somehow the details of your plan involve automatically > creating a root node for the interface in if_attach and then exposing > the node to the driver, possibly via a new pointer in struct ifnet? Via two functions (ifnet_get_sysctl_{context,root}() or something like it) which internally use extra members in struct ifnet, yes (or wherever it makes sense to place them without breaking the ABI) > I'm certainly fine with such a notion, but think we should establish, > for devices with a number of sysctl trees (i.e., dev.em vs if.em, > dev.da0 vs disk.da0, etc), a general philosophy for placing nodes in > one or the other somewhat deterministically. Hardware-related things go in dev, network-related things go in if. If you want to tune the number of DMA queues or whatever, do it in dev; if you want to allow traffic through a specific interface to bypass pfil, do it in if (this may be something we want to do centrally for all interfaces) What happened when dev was introduced was that certain settings which were previously system-wide for all instances of the same driver (e.g. all fxp devices) became per-device instead. I expect the same will happen with if, for instance: net.link.bridge.ipfw net.link.bridge.log_stp net.link.bridge.pfil_local_phys net.link.bridge.pfil_member net.link.bridge.pfil_bridge net.link.bridge.ipfw_arp net.link.bridge.pfil_onlyip would go into if.bridge.0.ipfw if.bridge.1.ipfw etc. so we will actually gain functionality while in all likelihood reducing the amount of code (and code duplication) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8663wia4as.fsf>