From 95a15f5c8435d206ae030c1ed698f4fca6afdeae Mon Sep 17 00:00:00 2001 From: zec Date: Wed, 26 Nov 2008 22:32:07 +0000 Subject: Merge more of currently non-functional (i.e. resolving to whitespace) macros from p4/vimage branch. Do a better job at enclosing all instantiations of globals scheduled for virtualization in #ifdef VIMAGE_GLOBALS blocks. De-virtualize and mark as const saorder_state_alive and saorder_state_any arrays from ipsec code, given that they are never updated at runtime, so virtualizing them would be pointless. Reviewed by: bz, julian Approved by: julian (mentor) Obtained from: //depot/projects/vimage-commit2/... X-MFC after: never Sponsored by: NLnet Foundation, The FreeBSD Foundation --- sys/net/if_loop.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/net/if_loop.c') diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index ba49d76..ab5bda7 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -105,6 +105,9 @@ IFC_SIMPLE_DECLARE(lo, 1); static void lo_clone_destroy(struct ifnet *ifp) { +#ifdef INVARIANTS + INIT_VNET_NET(ifp->if_vnet); +#endif /* XXX: destroying lo0 will lead to panics. */ KASSERT(V_loif != ifp, ("%s: destroying lo0", __func__)); @@ -141,6 +144,7 @@ lo_clone_create(struct if_clone *ifc, int unit, caddr_t params) static int loop_modevent(module_t mod, int type, void *data) { + INIT_VNET_NET(curvnet); switch (type) { case MOD_LOAD: -- cgit v1.1