MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vnet_rtables_init

Function vnet_rtables_init

freebsd/net/route/route_tables.c:248–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248static void
249vnet_rtables_init(const void *unused __unused)
250{
251 int num_rtables_base;
252
253 if (IS_DEFAULT_VNET(curvnet)) {
254 num_rtables_base = RT_NUMFIBS;
255 TUNABLE_INT_FETCH("net.fibs", &num_rtables_base);
256 V_rt_numfibs = normalize_num_rtables(num_rtables_base);
257 } else
258 V_rt_numfibs = 1;
259
260 vnet_rtzone_init();
261#ifdef FIB_ALGO
262 vnet_fib_init();
263#endif
264 RTABLES_LOCK_INIT();
265
266 RTABLES_LOCK();
267 grow_rtables(V_rt_numfibs);
268 RTABLES_UNLOCK();
269}
270VNET_SYSINIT(vnet_rtables_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH,
271 vnet_rtables_init, 0);
272

Callers

nothing calls this directly

Calls 4

normalize_num_rtablesFunction · 0.85
vnet_rtzone_initFunction · 0.85
vnet_fib_initFunction · 0.85
grow_rtablesFunction · 0.85

Tested by

no test coverage detected