cvs commit: src/sys/netgraph ng_base.c src/sys/sys kernel.h

Scott Long scottl at freebsd.org
Mon Jan 10 12:06:52 PST 2005


John-Mark Gurney wrote:

> Maksim Yevmenkin wrote this message on Thu, Jan 06, 2005 at 17:45 +0000:
> 
>>  This does not address the bigger problem: MODULE_DEPEND
>>  does not seem to work when modules are compiled in the
>>  kernel, but it fixes the problem with Netgraph Bluetooth
>>  device drivers reported by a few folks.
> 
> 
> The real problem is that MODULE_DEPEND only documents other kernel
> dependancies, but does not reorder SYSINIT's...  Considering that
> SYSINIT's are always suppose to be ordered properly (otherwise, what
> is the point of SYSINIT's) when staticly linked, having SYSINIT's not
> properly ordered is the only bug...
> 
> If we move to a more complex and module aware system of SYSINIT's, then
> it might happen, but this will be very difficult considering that when
> staticly linked, you have no way to seperate which SYSINIT's belong to
> which modules...
> 
> So, to everone, MODULE_DEPEND only marks which modules are required
> for this module to work, it does not infulence startup ordering at
> all...
> 

You hit it on the head, and this is why I recommended the solution that
Maksim used.  'Fixing' everything so that MODULE_DEPEND influenced
SI_SUB and SI_ORDER would be an incredibly huge undertaking.  ng_base
really isn't a driver anyways, it's a piece of infrastructure that
drivers rely on.  It's like saying that if.c is a driver.

The only thing to watch out for with this commit is for future coders to
understand that SI_SUB_NETGRAPH is _only_ for ng_base, not for netgraph
drivers.

Scott


More information about the cvs-src mailing list