Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153565982
D56473.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D56473.diff
View Options
diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c
--- a/sys/net/route/route_tables.c
+++ b/sys/net/route/route_tables.c
@@ -83,7 +83,7 @@
VNET_DEFINE_STATIC(struct rib_head **, rt_tables);
#define V_rt_tables VNET(rt_tables)
-VNET_DEFINE(uint32_t, _rt_numfibs) = RT_NUMFIBS;
+VNET_DEFINE(uint32_t, _rt_numfibs) = 1;
/*
* Handler for net.my_fibnum.
@@ -290,17 +290,25 @@
}
static void
-vnet_rtables_init(const void *unused __unused)
+rtnumfibs_init(const void *unused __unused)
{
int num_rtables_base;
- if (IS_DEFAULT_VNET(curvnet)) {
- num_rtables_base = RT_NUMFIBS;
- TUNABLE_INT_FETCH("net.fibs", &num_rtables_base);
- V_rt_numfibs = normalize_num_rtables(num_rtables_base);
- } else
- V_rt_numfibs = 1;
+ /*
+ * Set the number of FIBs based on compile-time and boot-time settings.
+ * For some reason, VNET jails do not inherit this parameter, so they
+ * must set net.fibs manually.
+ */
+ num_rtables_base = RT_NUMFIBS;
+ TUNABLE_INT_FETCH("net.fibs", &num_rtables_base);
+ V_rt_numfibs = normalize_num_rtables(num_rtables_base);
+}
+SYSINIT(rtnumfibs_init, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST, rtnumfibs_init,
+ NULL);
+static void
+vnet_rtables_init(const void *unused __unused)
+{
vnet_rtzone_init();
#ifdef FIB_ALGO
vnet_fib_init();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 11:24 PM (10 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31769863
Default Alt Text
D56473.diff (1 KB)
Attached To
Mode
D56473: route: Initialize V_rt_numfibs earlier during boot
Attached
Detach File
Event Timeline
Log In to Comment