2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Copyright (c) 2004-2009 University of Zagreb
5 * Copyright (c) 2006-2009 FreeBSD Foundation
8 * This software was developed by the University of Zagreb and the
9 * FreeBSD Foundation under sponsorship by the Stichting NLnet and the
12 * Copyright (c) 2009 Jeffrey Roberson <jeff@freebsd.org>
13 * Copyright (c) 2009 Robert N. M. Watson
14 * All rights reserved.
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 #include <sys/cdefs.h>
39 __FBSDID("$FreeBSD$");
44 #include <sys/param.h>
46 #include <sys/kernel.h>
49 #include <sys/systm.h>
50 #include <sys/sysctl.h>
51 #include <sys/eventhandler.h>
53 #include <sys/malloc.h>
55 #include <sys/socket.h>
57 #include <sys/sysctl.h>
59 #include <machine/stdarg.h>
63 #include <ddb/db_sym.h>
67 #include <net/if_var.h>
71 * This file implements core functions for virtual network stacks:
73 * - Virtual network stack management functions.
75 * - Virtual network stack memory allocator, which virtualizes global
76 * variables in the network stack
78 * - Virtualized SYSINIT's/SYSUNINIT's, which allow network stack subsystems
79 * to register startup/shutdown events to be run for each virtual network
83 FEATURE(vimage, "VIMAGE kernel virtualization");
85 static MALLOC_DEFINE(M_VNET, "vnet", "network stack control block");
88 * The virtual network stack list has two read-write locks, one sleepable and
89 * the other not, so that the list can be stablized and walked in a variety
90 * of network stack contexts. Both must be acquired exclusively to modify
91 * the list, but a read lock of either lock is sufficient to walk the list.
93 struct rwlock vnet_rwlock;
94 struct sx vnet_sxlock;
96 #define VNET_LIST_WLOCK() do { \
97 sx_xlock(&vnet_sxlock); \
98 rw_wlock(&vnet_rwlock); \
101 #define VNET_LIST_WUNLOCK() do { \
102 rw_wunlock(&vnet_rwlock); \
103 sx_xunlock(&vnet_sxlock); \
106 struct vnet_list_head vnet_head;
110 * The virtual network stack allocator provides storage for virtualized
111 * global variables. These variables are defined/declared using the
112 * VNET_DEFINE()/VNET_DECLARE() macros, which place them in the 'set_vnet'
113 * linker set. The details of the implementation are somewhat subtle, but
114 * allow the majority of most network subsystems to maintain
115 * virtualization-agnostic.
117 * The virtual network stack allocator handles variables in the base kernel
118 * vs. modules in similar but different ways. In both cases, virtualized
119 * global variables are marked as such by being declared to be part of the
120 * vnet linker set. These "master" copies of global variables serve two
123 * (1) They contain static initialization or "default" values for global
124 * variables which will be propagated to each virtual network stack
125 * instance when created. As with normal global variables, they default
128 * (2) They act as unique global names by which the variable can be referred
129 * to, regardless of network stack instance. The single global symbol
130 * will be used to calculate the location of a per-virtual instance
131 * variable at run-time.
133 * Each virtual network stack instance has a complete copy of each
134 * virtualized global variable, stored in a malloc'd block of memory
135 * referred to by vnet->vnet_data_mem. Critical to the design is that each
136 * per-instance memory block is laid out identically to the master block so
137 * that the offset of each global variable is the same across all blocks. To
138 * optimize run-time access, a precalculated 'base' address,
139 * vnet->vnet_data_base, is stored in each vnet, and is the amount that can
140 * be added to the address of a 'master' instance of a variable to get to the
143 * Virtualized global variables are handled in a similar manner, but as each
144 * module has its own 'set_vnet' linker set, and we want to keep all
145 * virtualized globals togther, we reserve space in the kernel's linker set
146 * for potential module variables using a per-vnet character array,
147 * 'modspace'. The virtual network stack allocator maintains a free list to
148 * track what space in the array is free (all, initially) and as modules are
149 * linked, allocates portions of the space to specific globals. The kernel
150 * module linker queries the virtual network stack allocator and will
151 * bind references of the global to the location during linking. It also
152 * calls into the virtual network stack allocator, once the memory is
153 * initialized, in order to propagate the new static initializations to all
154 * existing virtual network stack instances so that the soon-to-be executing
155 * module will find every network stack instance with proper default values.
159 * Number of bytes of data in the 'set_vnet' linker set, and hence the total
160 * size of all kernel virtualized global variables, and the malloc(9) type
161 * that will be used to allocate it.
163 #define VNET_BYTES (VNET_STOP - VNET_START)
165 static MALLOC_DEFINE(M_VNET_DATA, "vnet_data", "VNET data");
168 * VNET_MODMIN is the minimum number of bytes we will reserve for the sum of
169 * global variables across all loaded modules. As this actually sizes an
170 * array declared as a virtualized global variable in the kernel itself, and
171 * we want the virtualized global variable space to be page-sized, we may
172 * have more space than that in practice.
174 #define VNET_MODMIN 8192
175 #define VNET_SIZE roundup2(VNET_BYTES, PAGE_SIZE)
178 * Space to store virtualized global variables from loadable kernel modules,
179 * and the free list to manage it.
181 static VNET_DEFINE(char, modspace[VNET_MODMIN]);
184 * Global lists of subsystem constructor and destructors for vnets. They are
185 * registered via VNET_SYSINIT() and VNET_SYSUNINIT(). Both lists are
186 * protected by the vnet_sysinit_sxlock global lock.
188 static TAILQ_HEAD(vnet_sysinit_head, vnet_sysinit) vnet_constructors =
189 TAILQ_HEAD_INITIALIZER(vnet_constructors);
190 static TAILQ_HEAD(vnet_sysuninit_head, vnet_sysinit) vnet_destructors =
191 TAILQ_HEAD_INITIALIZER(vnet_destructors);
193 struct sx vnet_sysinit_sxlock;
195 #define VNET_SYSINIT_WLOCK() sx_xlock(&vnet_sysinit_sxlock);
196 #define VNET_SYSINIT_WUNLOCK() sx_xunlock(&vnet_sysinit_sxlock);
197 #define VNET_SYSINIT_RLOCK() sx_slock(&vnet_sysinit_sxlock);
198 #define VNET_SYSINIT_RUNLOCK() sx_sunlock(&vnet_sysinit_sxlock);
200 struct vnet_data_free {
203 TAILQ_ENTRY(vnet_data_free) vnd_link;
206 static MALLOC_DEFINE(M_VNET_DATA_FREE, "vnet_data_free",
207 "VNET resource accounting");
208 static TAILQ_HEAD(, vnet_data_free) vnet_data_free_head =
209 TAILQ_HEAD_INITIALIZER(vnet_data_free_head);
210 static struct sx vnet_data_free_lock;
212 SDT_PROVIDER_DEFINE(vnet);
213 SDT_PROBE_DEFINE1(vnet, functions, vnet_alloc, entry, "int");
214 SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, alloc, "int",
216 SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, return,
217 "int", "struct vnet *");
218 SDT_PROBE_DEFINE2(vnet, functions, vnet_destroy, entry,
219 "int", "struct vnet *");
220 SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, return,
224 static void db_show_vnet_print_vs(struct vnet_sysinit *, int);
228 * Allocate a virtual network stack.
235 SDT_PROBE1(vnet, functions, vnet_alloc, entry, __LINE__);
236 vnet = malloc(sizeof(struct vnet), M_VNET, M_WAITOK | M_ZERO);
237 vnet->vnet_magic_n = VNET_MAGIC_N;
238 vnet->vnet_state = 0;
239 SDT_PROBE2(vnet, functions, vnet_alloc, alloc, __LINE__, vnet);
242 * Allocate storage for virtualized global variables and copy in
243 * initial values form our 'master' copy.
245 vnet->vnet_data_mem = malloc(VNET_SIZE, M_VNET_DATA, M_WAITOK);
246 memcpy(vnet->vnet_data_mem, (void *)VNET_START, VNET_BYTES);
249 * All use of vnet-specific data will immediately subtract VNET_START
250 * from the base memory pointer, so pre-calculate that now to avoid
253 vnet->vnet_data_base = (uintptr_t)vnet->vnet_data_mem - VNET_START;
255 /* Initialize / attach vnet module instances. */
256 CURVNET_SET_QUIET(vnet);
261 LIST_INSERT_HEAD(&vnet_head, vnet, vnet_le);
264 SDT_PROBE2(vnet, functions, vnet_alloc, return, __LINE__, vnet);
269 * Destroy a virtual network stack.
272 vnet_destroy(struct vnet *vnet)
275 SDT_PROBE2(vnet, functions, vnet_destroy, entry, __LINE__, vnet);
276 KASSERT(vnet->vnet_sockcnt == 0,
277 ("%s: vnet still has sockets", __func__));
280 LIST_REMOVE(vnet, vnet_le);
283 CURVNET_SET_QUIET(vnet);
288 * Release storage for the virtual network stack instance.
290 free(vnet->vnet_data_mem, M_VNET_DATA);
291 vnet->vnet_data_mem = NULL;
292 vnet->vnet_data_base = 0;
293 vnet->vnet_magic_n = 0xdeadbeef;
295 SDT_PROBE1(vnet, functions, vnet_destroy, return, __LINE__);
299 * Boot time initialization and allocation of virtual network stacks.
302 vnet_init_prelink(void *arg __unused)
305 rw_init(&vnet_rwlock, "vnet_rwlock");
306 sx_init(&vnet_sxlock, "vnet_sxlock");
307 sx_init(&vnet_sysinit_sxlock, "vnet_sysinit_sxlock");
308 LIST_INIT(&vnet_head);
310 SYSINIT(vnet_init_prelink, SI_SUB_VNET_PRELINK, SI_ORDER_FIRST,
311 vnet_init_prelink, NULL);
314 vnet0_init(void *arg __unused)
318 printf("VIMAGE (virtualized network stack) enabled\n");
321 * We MUST clear curvnet in vi_init_done() before going SMP,
322 * otherwise CURVNET_SET() macros would scream about unnecessary
323 * curvnet recursions.
325 curvnet = prison0.pr_vnet = vnet0 = vnet_alloc();
327 SYSINIT(vnet0_init, SI_SUB_VNET, SI_ORDER_FIRST, vnet0_init, NULL);
330 vnet_init_done(void *unused __unused)
335 SYSINIT(vnet_init_done, SI_SUB_VNET_DONE, SI_ORDER_ANY, vnet_init_done,
339 * Once on boot, initialize the modspace freelist to entirely cover modspace.
342 vnet_data_startup(void *dummy __unused)
344 struct vnet_data_free *df;
346 df = malloc(sizeof(*df), M_VNET_DATA_FREE, M_WAITOK | M_ZERO);
347 df->vnd_start = (uintptr_t)&VNET_NAME(modspace);
348 df->vnd_len = VNET_MODMIN;
349 TAILQ_INSERT_HEAD(&vnet_data_free_head, df, vnd_link);
350 sx_init(&vnet_data_free_lock, "vnet_data alloc lock");
352 SYSINIT(vnet_data, SI_SUB_KLD, SI_ORDER_FIRST, vnet_data_startup, 0);
354 /* Dummy VNET_SYSINIT to make sure we always reach the final end state. */
356 vnet_sysinit_done(void *unused __unused)
361 VNET_SYSINIT(vnet_sysinit_done, SI_SUB_VNET_DONE, SI_ORDER_ANY,
362 vnet_sysinit_done, NULL);
365 * When a module is loaded and requires storage for a virtualized global
366 * variable, allocate space from the modspace free list. This interface
367 * should be used only by the kernel linker.
370 vnet_data_alloc(int size)
372 struct vnet_data_free *df;
376 size = roundup2(size, sizeof(void *));
377 sx_xlock(&vnet_data_free_lock);
378 TAILQ_FOREACH(df, &vnet_data_free_head, vnd_link) {
379 if (df->vnd_len < size)
381 if (df->vnd_len == size) {
382 s = (void *)df->vnd_start;
383 TAILQ_REMOVE(&vnet_data_free_head, df, vnd_link);
384 free(df, M_VNET_DATA_FREE);
387 s = (void *)df->vnd_start;
389 df->vnd_start = df->vnd_start + size;
392 sx_xunlock(&vnet_data_free_lock);
398 * Free space for a virtualized global variable on module unload.
401 vnet_data_free(void *start_arg, int size)
403 struct vnet_data_free *df;
404 struct vnet_data_free *dn;
408 size = roundup2(size, sizeof(void *));
409 start = (uintptr_t)start_arg;
412 * Free a region of space and merge it with as many neighbors as
413 * possible. Keeping the list sorted simplifies this operation.
415 sx_xlock(&vnet_data_free_lock);
416 TAILQ_FOREACH(df, &vnet_data_free_head, vnd_link) {
417 if (df->vnd_start > end)
420 * If we expand at the end of an entry we may have to merge
421 * it with the one following it as well.
423 if (df->vnd_start + df->vnd_len == start) {
425 dn = TAILQ_NEXT(df, vnd_link);
426 if (df->vnd_start + df->vnd_len == dn->vnd_start) {
427 df->vnd_len += dn->vnd_len;
428 TAILQ_REMOVE(&vnet_data_free_head, dn,
430 free(dn, M_VNET_DATA_FREE);
432 sx_xunlock(&vnet_data_free_lock);
435 if (df->vnd_start == end) {
436 df->vnd_start = start;
438 sx_xunlock(&vnet_data_free_lock);
442 dn = malloc(sizeof(*df), M_VNET_DATA_FREE, M_WAITOK | M_ZERO);
443 dn->vnd_start = start;
446 TAILQ_INSERT_BEFORE(df, dn, vnd_link);
448 TAILQ_INSERT_TAIL(&vnet_data_free_head, dn, vnd_link);
449 sx_xunlock(&vnet_data_free_lock);
453 * When a new virtualized global variable has been allocated, propagate its
454 * initial value to each already-allocated virtual network stack instance.
457 vnet_data_copy(void *start, int size)
462 LIST_FOREACH(vnet, &vnet_head, vnet_le)
463 memcpy((void *)((uintptr_t)vnet->vnet_data_base +
464 (uintptr_t)start), start, size);
469 * Support for special SYSINIT handlers registered via VNET_SYSINIT()
470 * and VNET_SYSUNINIT().
473 vnet_register_sysinit(void *arg)
475 struct vnet_sysinit *vs, *vs2;
479 KASSERT(vs->subsystem > SI_SUB_VNET, ("vnet sysinit too early"));
481 /* Add the constructor to the global list of vnet constructors. */
482 VNET_SYSINIT_WLOCK();
483 TAILQ_FOREACH(vs2, &vnet_constructors, link) {
484 if (vs2->subsystem > vs->subsystem)
486 if (vs2->subsystem == vs->subsystem && vs2->order > vs->order)
490 TAILQ_INSERT_BEFORE(vs2, vs, link);
492 TAILQ_INSERT_TAIL(&vnet_constructors, vs, link);
495 * Invoke the constructor on all the existing vnets when it is
499 CURVNET_SET_QUIET(vnet);
503 VNET_SYSINIT_WUNLOCK();
507 vnet_deregister_sysinit(void *arg)
509 struct vnet_sysinit *vs;
513 /* Remove the constructor from the global list of vnet constructors. */
514 VNET_SYSINIT_WLOCK();
515 TAILQ_REMOVE(&vnet_constructors, vs, link);
516 VNET_SYSINIT_WUNLOCK();
520 vnet_register_sysuninit(void *arg)
522 struct vnet_sysinit *vs, *vs2;
526 /* Add the destructor to the global list of vnet destructors. */
527 VNET_SYSINIT_WLOCK();
528 TAILQ_FOREACH(vs2, &vnet_destructors, link) {
529 if (vs2->subsystem > vs->subsystem)
531 if (vs2->subsystem == vs->subsystem && vs2->order > vs->order)
535 TAILQ_INSERT_BEFORE(vs2, vs, link);
537 TAILQ_INSERT_TAIL(&vnet_destructors, vs, link);
538 VNET_SYSINIT_WUNLOCK();
542 vnet_deregister_sysuninit(void *arg)
544 struct vnet_sysinit *vs;
550 * Invoke the destructor on all the existing vnets when it is
553 VNET_SYSINIT_WLOCK();
555 CURVNET_SET_QUIET(vnet);
560 /* Remove the destructor from the global list of vnet destructors. */
561 TAILQ_REMOVE(&vnet_destructors, vs, link);
562 VNET_SYSINIT_WUNLOCK();
566 * Invoke all registered vnet constructors on the current vnet. Used during
567 * vnet construction. The caller is responsible for ensuring the new vnet is
568 * the current vnet and that the vnet_sysinit_sxlock lock is locked.
573 struct vnet_sysinit *vs;
575 VNET_SYSINIT_RLOCK();
576 TAILQ_FOREACH(vs, &vnet_constructors, link) {
577 curvnet->vnet_state = vs->subsystem;
580 VNET_SYSINIT_RUNLOCK();
584 * Invoke all registered vnet destructors on the current vnet. Used during
585 * vnet destruction. The caller is responsible for ensuring the dying vnet
586 * the current vnet and that the vnet_sysinit_sxlock lock is locked.
591 struct vnet_sysinit *vs;
593 VNET_SYSINIT_RLOCK();
594 TAILQ_FOREACH_REVERSE(vs, &vnet_destructors, vnet_sysuninit_head,
596 curvnet->vnet_state = vs->subsystem;
599 VNET_SYSINIT_RUNLOCK();
603 * EVENTHANDLER(9) extensions.
606 * Invoke the eventhandler function originally registered with the possibly
607 * registered argument for all virtual network stack instances.
609 * This iterator can only be used for eventhandlers that do not take any
610 * additional arguments, as we do ignore the variadic arguments from the
611 * EVENTHANDLER_INVOKE() call.
614 vnet_global_eventhandler_iterator_func(void *arg, ...)
616 VNET_ITERATOR_DECL(vnet_iter);
617 struct eventhandler_entry_vimage *v_ee;
620 * There is a bug here in that we should actually cast things to
621 * (struct eventhandler_entry_ ## name *) but that's not easily
622 * possible in here so just re-using the variadic version we
623 * defined for the generic vimage case.
627 VNET_FOREACH(vnet_iter) {
628 CURVNET_SET(vnet_iter);
629 ((vimage_iterator_func_t)v_ee->func)(v_ee->ee_arg);
636 struct vnet_recursion {
637 SLIST_ENTRY(vnet_recursion) vnr_le;
639 const char *where_fn;
641 struct vnet *old_vnet;
642 struct vnet *new_vnet;
645 static SLIST_HEAD(, vnet_recursion) vnet_recursions =
646 SLIST_HEAD_INITIALIZER(vnet_recursions);
649 vnet_print_recursion(struct vnet_recursion *vnr, int brief)
653 printf("CURVNET_SET() recursion in ");
654 printf("%s() line %d, prev in %s()", vnr->where_fn, vnr->where_line,
660 printf("%p -> %p\n", vnr->old_vnet, vnr->new_vnet);
664 vnet_log_recursion(struct vnet *old_vnet, const char *old_fn, int line)
666 struct vnet_recursion *vnr;
668 /* Skip already logged recursion events. */
669 SLIST_FOREACH(vnr, &vnet_recursions, vnr_le)
670 if (vnr->prev_fn == old_fn &&
671 vnr->where_fn == curthread->td_vnet_lpush &&
672 vnr->where_line == line &&
673 (vnr->old_vnet == vnr->new_vnet) == (curvnet == old_vnet))
676 vnr = malloc(sizeof(*vnr), M_VNET, M_NOWAIT | M_ZERO);
678 panic("%s: malloc failed", __func__);
679 vnr->prev_fn = old_fn;
680 vnr->where_fn = curthread->td_vnet_lpush;
681 vnr->where_line = line;
682 vnr->old_vnet = old_vnet;
683 vnr->new_vnet = curvnet;
685 SLIST_INSERT_HEAD(&vnet_recursions, vnr, vnr_le);
687 vnet_print_recursion(vnr, 0);
692 #endif /* VNET_DEBUG */
699 db_vnet_print(struct vnet *vnet)
702 db_printf("vnet = %p\n", vnet);
703 db_printf(" vnet_magic_n = %#08x (%s, orig %#08x)\n",
705 (vnet->vnet_magic_n == VNET_MAGIC_N) ?
706 "ok" : "mismatch", VNET_MAGIC_N);
707 db_printf(" vnet_ifcnt = %u\n", vnet->vnet_ifcnt);
708 db_printf(" vnet_sockcnt = %u\n", vnet->vnet_sockcnt);
709 db_printf(" vnet_data_mem = %p\n", vnet->vnet_data_mem);
710 db_printf(" vnet_data_base = %#jx\n",
711 (uintmax_t)vnet->vnet_data_base);
712 db_printf(" vnet_state = %#08x\n", vnet->vnet_state);
716 DB_SHOW_ALL_COMMAND(vnets, db_show_all_vnets)
718 VNET_ITERATOR_DECL(vnet_iter);
720 VNET_FOREACH(vnet_iter) {
721 db_vnet_print(vnet_iter);
727 DB_SHOW_COMMAND(vnet, db_show_vnet)
731 db_printf("usage: show vnet <struct vnet *>\n");
735 db_vnet_print((struct vnet *)addr);
739 db_show_vnet_print_vs(struct vnet_sysinit *vs, int ddb)
741 const char *vsname, *funcname;
745 #define xprint(...) \
747 db_printf(__VA_ARGS__); \
752 xprint("%s: no vnet_sysinit * given\n", __func__);
756 sym = db_search_symbol((vm_offset_t)vs, DB_STGY_ANY, &offset);
757 db_symbol_values(sym, &vsname, NULL);
758 sym = db_search_symbol((vm_offset_t)vs->func, DB_STGY_PROC, &offset);
759 db_symbol_values(sym, &funcname, NULL);
760 xprint("%s(%p)\n", (vsname != NULL) ? vsname : "", vs);
761 xprint(" %#08x %#08x\n", vs->subsystem, vs->order);
762 xprint(" %p(%s)(%p)\n",
763 vs->func, (funcname != NULL) ? funcname : "", vs->arg);
767 DB_SHOW_COMMAND(vnet_sysinit, db_show_vnet_sysinit)
769 struct vnet_sysinit *vs;
771 db_printf("VNET_SYSINIT vs Name(Ptr)\n");
772 db_printf(" Subsystem Order\n");
773 db_printf(" Function(Name)(Arg)\n");
774 TAILQ_FOREACH(vs, &vnet_constructors, link) {
775 db_show_vnet_print_vs(vs, 1);
781 DB_SHOW_COMMAND(vnet_sysuninit, db_show_vnet_sysuninit)
783 struct vnet_sysinit *vs;
785 db_printf("VNET_SYSUNINIT vs Name(Ptr)\n");
786 db_printf(" Subsystem Order\n");
787 db_printf(" Function(Name)(Arg)\n");
788 TAILQ_FOREACH_REVERSE(vs, &vnet_destructors, vnet_sysuninit_head,
790 db_show_vnet_print_vs(vs, 1);
797 DB_SHOW_COMMAND(vnetrcrs, db_show_vnetrcrs)
799 struct vnet_recursion *vnr;
801 SLIST_FOREACH(vnr, &vnet_recursions, vnr_le)
802 vnet_print_recursion(vnr, 1);