diff options
author | zec <zec@FreeBSD.org> | 2009-06-08 17:15:40 +0000 |
---|---|---|
committer | zec <zec@FreeBSD.org> | 2009-06-08 17:15:40 +0000 |
commit | 8b1f38241aaf07621c062901b7946145be2862b6 (patch) | |
tree | 7c00057a3f90cc6cfd121e2a6594d254fc72cba3 /sys/net/vnet.h | |
parent | 76b38c556af92b00895865a09a6f444150b8a8d8 (diff) | |
download | FreeBSD-src-8b1f38241aaf07621c062901b7946145be2862b6.zip FreeBSD-src-8b1f38241aaf07621c062901b7946145be2862b6.tar.gz |
Introduce an infrastructure for dismantling vnet instances.
Vnet modules and protocol domains may now register destructor
functions to clean up and release per-module state. The destructor
mechanisms can be triggered by invoking "vimage -d", or a future
equivalent command which will be provided via the new jail framework.
While this patch introduces numerous placeholder destructor functions,
many of those are currently incomplete, thus leaking memory or (even
worse) failing to stop all running timers. Many of such issues are
already known and will be incrementaly fixed over the next weeks in
smaller incremental commits.
Apart from introducing new fields in structs ifnet, domain, protosw
and vnet_net, which requires the kernel and modules to be rebuilt, this
change should have no impact on nooptions VIMAGE builds, since vnet
destructors can only be called in VIMAGE kernels. Moreover,
destructor functions should be in general compiled in only in
options VIMAGE builds, except for kernel modules which can be safely
kldunloaded at run time.
Bump __FreeBSD_version to 800097.
Reviewed by: bz, julian
Approved by: rwatson, kib (re), julian (mentor)
Diffstat (limited to 'sys/net/vnet.h')
-rw-r--r-- | sys/net/vnet.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/vnet.h b/sys/net/vnet.h index d36c303..696e472 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -51,6 +51,7 @@ struct vnet_net { struct ifnet * _loif; struct if_clone * _lo_cloner; + struct ifc_simple_data *_lo_cloner_data; LIST_HEAD(, rawcb) _rawcb_list; @@ -87,6 +88,7 @@ extern struct vnet_net vnet_net_0; #define V_ifklist VNET_NET(ifklist) #define V_ifnet VNET_NET(ifnet) #define V_lo_cloner VNET_NET(lo_cloner) +#define V_lo_cloner_data VNET_NET(lo_cloner_data) #define V_loif VNET_NET(loif) #define V_rawcb_list VNET_NET(rawcb_list) #define V_rt_tables VNET_NET(rt_tables) |