aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_clone.h
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2009-07-23 20:46:49 +0000
committerRobert Watson <rwatson@FreeBSD.org>2009-07-23 20:46:49 +0000
commitd0728d71742e6b2304a3b370f4f4bec9e7d1dc5e (patch)
tree0191b21173debdadfbf9f7565dfc5a8b9eefe94a /sys/net/if_clone.h
parent33131452436fb9cf43bea55ec94b46e6eee348d4 (diff)
downloadsrc-d0728d71742e6b2304a3b370f4f4bec9e7d1dc5e.tar.gz
src-d0728d71742e6b2304a3b370f4f4bec9e7d1dc5e.zip
Introduce and use a sysinit-based initialization scheme for virtual
network stacks, VNET_SYSINIT: - Add VNET_SYSINIT and VNET_SYSUNINIT macros to declare events that will occur each time a network stack is instantiated and destroyed. In the !VIMAGE case, these are simply mapped into regular SYSINIT/SYSUNINIT. For the VIMAGE case, we instead use SYSINIT's to track their order and properties on registration, using them for each vnet when created/ destroyed, or immediately on module load for already-started vnets. - Remove vnet_modinfo mechanism that existed to serve this purpose previously, as well as its dependency scheme: we now just use the SYSINIT ordering scheme. - Implement VNET_DOMAIN_SET() to allow protocol domains to declare that they want init functions to be called for each virtual network stack rather than just once at boot, compiling down to DOMAIN_SET() in the non-VIMAGE case. - Walk all virtualized kernel subsystems and make use of these instead of modinfo or DOMAIN_SET() for init/uninit events. In some cases, convert modular components from using modevent to using sysinit (where appropriate). In some cases, do minor rejuggling of SYSINIT ordering to make room for or better manage events. Portions submitted by: jhb (VNET_SYSINIT), bz (cleanup) Discussed with: jhb, bz, julian, zec Reviewed by: bz Approved by: re (VIMAGE blanket)
Notes
Notes: svn path=/head/; revision=195837
Diffstat (limited to 'sys/net/if_clone.h')
-rw-r--r--sys/net/if_clone.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/if_clone.h b/sys/net/if_clone.h
index 280a5455db86..f125f8b5060f 100644
--- a/sys/net/if_clone.h
+++ b/sys/net/if_clone.h
@@ -72,6 +72,7 @@ struct if_clone {
void if_clone_init(void);
void if_clone_attach(struct if_clone *);
void if_clone_detach(struct if_clone *);
+void vnet_if_clone_init(void);
int if_clone_create(char *, size_t, caddr_t);
int if_clone_destroy(const char *);