summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorzec <zec@FreeBSD.org>2009-05-23 21:43:44 +0000
committerzec <zec@FreeBSD.org>2009-05-23 21:43:44 +0000
commit48f748dc297cbf46f02ec8b61d47436d66d0d8b9 (patch)
tree488633605f2f07bbba417ff74314596b3bb04cf2 /sys/kern
parent40574d258ab1aec7b8c5ad9d5d9ee09d5e3f5296 (diff)
downloadFreeBSD-src-48f748dc297cbf46f02ec8b61d47436d66d0d8b9.zip
FreeBSD-src-48f748dc297cbf46f02ec8b61d47436d66d0d8b9.tar.gz
V_irtualize the if_clone framework, thus allowing for clonable ifnets
to optionally have overlapping unit numbers if attached in different vnets. At this stage if_loop is the only clonable ifnet class that has been extended to allow for such overlapping allocation of unit numbers, i.e. in each vnet it is possible to have a lo0 interface. Other clonable ifnet classes remain to operate with traditional semantics, i.e. each instance of a clonable ifnet will be assigned a globally unique unit number, regardless in which vnet such an ifnet becomes instantiated. While here, garbage collect unused _lo_list field in struct vnet_net, as well as improve indentation for #defines in sys/net/vnet.h. The layout of struct vnet_net has changed, therefore bump __FreeBSD_version. This change has no functional impact on nooptions VIMAGE kernel builds. Reviewed by: bz, brooks Approved by: julian (mentor)
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_vimage.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/kern_vimage.c b/sys/kern/kern_vimage.c
index d4c48b5..7cb6d84 100644
--- a/sys/kern/kern_vimage.c
+++ b/sys/kern/kern_vimage.c
@@ -66,6 +66,10 @@ struct vprocg vprocg_0;
#endif
#endif
+#ifdef VIMAGE
+struct vnet *vnet0;
+#endif
+
void
vnet_mod_register(const struct vnet_modinfo *vmi)
{
@@ -331,6 +335,7 @@ vi_init(void *unused)
LIST_INSERT_HEAD(&vnet_head, vnet, vnet_le);
vnet->vnet_magic_n = VNET_MAGIC_N;
vip->v_net = vnet;
+ vnet0 = vnet;
/* We MUST clear curvnet in vi_init_done before going SMP. */
curvnet = LIST_FIRST(&vnet_head);
OpenPOWER on IntegriCloud