Re: netgraph(4) initialization order

From: Maksim Yevmenkin <maksim.yevmenkin_at_savvis.net>
Date: Wed, 05 Jan 2005 13:00:17 -0800
Scott Long wrote:
> Maksim Yevmenkin wrote:
> 
>> Dear Hackers,
>>
>> any objections to the attached patch?
>>
> 
> Yes, as I stated in another email, I think that the core netgraph
> module should be initialized before the SI_SUB_DRIVERS step.  I
> propose creating a new sysinit called SI_SUB_NETGRAPH with a value
> of 0x30100000.  That way it comes after SI_SUB_IF and before
> SI_SUB_DRIVERS.  This make fiddling with SI_ORDER_* unneccesary.

how about new attached patch?

thanks,
max

--- sys/kernel.h.orig	Wed Jan  5 12:55:03 2005
+++ sys/kernel.h	Wed Jan  5 12:55:51 2005
_at__at_ -132,6 +132,7 _at__at_
 	SI_SUB_SOFTINTR		= 0x2800001,	/* start soft interrupt thread */
 	SI_SUB_DEVFS		= 0x2F00000,	/* devfs ready for devices */
 	SI_SUB_INIT_IF		= 0x3000000,	/* prep for net interfaces */
+	SI_SUB_NETGRAPH		= 0x3010000,	/* Let Netgraph initialize */
 	SI_SUB_DRIVERS		= 0x3100000,	/* Let Drivers initialize */
 	SI_SUB_CONFIGURE	= 0x3800000,	/* Configure devices */
 	SI_SUB_VFS		= 0x4000000,	/* virtual filesystem*/
--- netgraph/ng_base.c.orig	Wed Jan  5 12:04:36 2005
+++ netgraph/ng_base.c	Wed Jan  5 12:56:51 2005
_at__at_ -2991,7 +2991,7 _at__at_
 	ngb_mod_event,
 	(NULL)
 };
-DECLARE_MODULE(netgraph, netgraph_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE);
+DECLARE_MODULE(netgraph, netgraph_mod, SI_SUB_NETGRAPH, SI_ORDER_MIDDLE);
 SYSCTL_NODE(_net, OID_AUTO, graph, CTLFLAG_RW, 0, "netgraph Family");
 SYSCTL_INT(_net_graph, OID_AUTO, abi_version, CTLFLAG_RD, 0, NG_ABI_VERSION,"");
 SYSCTL_INT(_net_graph, OID_AUTO, msg_version, CTLFLAG_RD, 0, NG_VERSION, "");
Received on Wed Jan 05 2005 - 20:02:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:25 UTC