Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route/route_tables.c
Show First 20 Lines • Show All 256 Lines • ▼ Show 20 Lines | if (IS_DEFAULT_VNET(curvnet)) { | ||||
V_rt_numfibs = normalize_num_rtables(num_rtables_base); | V_rt_numfibs = normalize_num_rtables(num_rtables_base); | ||||
} else | } else | ||||
V_rt_numfibs = 1; | V_rt_numfibs = 1; | ||||
vnet_rtzone_init(); | vnet_rtzone_init(); | ||||
#ifdef FIB_ALGO | #ifdef FIB_ALGO | ||||
vnet_fib_init(); | vnet_fib_init(); | ||||
#endif | #endif | ||||
vnet_nhops_init_neigh(); | |||||
RTABLES_LOCK_INIT(); | RTABLES_LOCK_INIT(); | ||||
RTABLES_LOCK(); | RTABLES_LOCK(); | ||||
grow_rtables(V_rt_numfibs); | grow_rtables(V_rt_numfibs); | ||||
RTABLES_UNLOCK(); | RTABLES_UNLOCK(); | ||||
} | } | ||||
VNET_SYSINIT(vnet_rtables_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, | VNET_SYSINIT(vnet_rtables_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, | ||||
vnet_rtables_init, 0); | vnet_rtables_init, 0); | ||||
Show All 28 Lines | rtables_destroy(const void *unused __unused) | ||||
*/ | */ | ||||
epoch_drain_callbacks(net_epoch_preempt); | epoch_drain_callbacks(net_epoch_preempt); | ||||
free(V_rt_tables, M_RTABLE); | free(V_rt_tables, M_RTABLE); | ||||
vnet_rtzone_destroy(); | vnet_rtzone_destroy(); | ||||
#ifdef FIB_ALGO | #ifdef FIB_ALGO | ||||
vnet_fib_destroy(); | vnet_fib_destroy(); | ||||
#endif | #endif | ||||
vnet_nhop_destroy_neigh(); | |||||
} | } | ||||
VNET_SYSUNINIT(rtables_destroy, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, | VNET_SYSUNINIT(rtables_destroy, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, | ||||
rtables_destroy, 0); | rtables_destroy, 0); | ||||
#endif | #endif | ||||
static inline struct rib_head * | static inline struct rib_head * | ||||
rt_tables_get_rnh_ptr(uint32_t table, sa_family_t family) | rt_tables_get_rnh_ptr(uint32_t table, sa_family_t family) | ||||
{ | { | ||||
Show All 33 Lines |