aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_hhook.c
diff options
context:
space:
mode:
authorLawrence Stewart <lstewart@FreeBSD.org>2013-06-15 10:08:34 +0000
committerLawrence Stewart <lstewart@FreeBSD.org>2013-06-15 10:08:34 +0000
commit38f080cb04b2c2e70b53ae6d816fd32f831d4d48 (patch)
tree2c4784d20a366a3beb22afa8785541c41e056e76 /sys/kern/kern_hhook.c
parentd23f3f67b596d02f87676569c65c9683b0ffd514 (diff)
downloadsrc-38f080cb04b2c2e70b53ae6d816fd32f831d4d48.tar.gz
src-38f080cb04b2c2e70b53ae6d816fd32f831d4d48.zip
Move hhook's per-vnet initialisation to an earlier SYSINIT SI_SUB stage to
ensure all per-vnet related hhook initialisation is completed prior to any virtualised hhook points attempting registration. vnet_register_sysinit() requires that a stage later than SI_SUB_VNET be chosen. There are no per-vnet initialisors in the source tree at this time which run earlier than SI_SUB_INIT_IF. A quick audit of non-virtualised SYSINITs indicates there are no subsystems pre SI_SUB_MBUF that would likely be interested in registering a virtualised hhook point. Settle on SI_SUB_MBUF as hhook's per-vnet initialisation stage as it's the first overtly network-related initilisation stage to run after SI_SUB_VNET. If a subsystem that initialises earlier than SI_SUB_MBUF ends up wanting to register virtualised hhook points in future, hhook's use of SI_SUB_MBUF will need to be revisited and would probably warrant creating a dedicated SI_SUB_HHOOK which runs immediately after SI_SUB_VNET. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=251787
Diffstat (limited to 'sys/kern/kern_hhook.c')
-rw-r--r--sys/kern/kern_hhook.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_hhook.c b/sys/kern/kern_hhook.c
index a9b587423943..321e1a9fd37a 100644
--- a/sys/kern/kern_hhook.c
+++ b/sys/kern/kern_hhook.c
@@ -509,7 +509,7 @@ hhook_vnet_uninit(const void *unused __unused)
/*
* When a vnet is created and being initialised, init the V_hhook_vhead_list.
*/
-VNET_SYSINIT(hhook_vnet_init, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST,
+VNET_SYSINIT(hhook_vnet_init, SI_SUB_MBUF, SI_ORDER_FIRST,
hhook_vnet_init, NULL);
/*
@@ -517,5 +517,5 @@ VNET_SYSINIT(hhook_vnet_init, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST,
* points to clean up on vnet tear down, but in case the KPI is misused,
* provide a function to clean up and free memory for a vnet being destroyed.
*/
-VNET_SYSUNINIT(hhook_vnet_uninit, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST,
+VNET_SYSUNINIT(hhook_vnet_uninit, SI_SUB_MBUF, SI_ORDER_ANY,
hhook_vnet_uninit, NULL);