aboutsummaryrefslogtreecommitdiff
path: root/sys/net/route/route_var.h
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2020-08-21 21:34:52 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2020-08-21 21:34:52 +0000
commitf5247a232a337c93c690068930f25503d4dab8e1 (patch)
tree3421aeb15aa4edc41ba2f57b013ed6cc8e15cb96 /sys/net/route/route_var.h
parent19337211f83156c151fcc51dc48edc47b4b96cd6 (diff)
downloadsrc-f5247a232a337c93c690068930f25503d4dab8e1.tar.gz
src-f5247a232a337c93c690068930f25503d4dab8e1.zip
Make net.fibs growable.
Allow to dynamically grow the amount of fibs in each vnet. This change alters current behavior. Currently, if one defines ROUTETABLES > 1 in the kernel config, each vnet will be created with the number of fibs defined in the kernel config. After this commit vnets will be created with fibs=1. Dynamic net.fibs is not compatible with net.add_addr_allfibs. The plan is to deprecate the latter and make net.add_addr_allfibs=0 default behaviour. Reviewed by: glebius Relnotes: yes Differential Revision: https://reviews.freebsd.org/D26062
Notes
Notes: svn path=/head/; revision=364465
Diffstat (limited to 'sys/net/route/route_var.h')
-rw-r--r--sys/net/route/route_var.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/route/route_var.h b/sys/net/route/route_var.h
index a55835ffa9d6..0422e63f3778 100644
--- a/sys/net/route/route_var.h
+++ b/sys/net/route/route_var.h
@@ -79,6 +79,7 @@ struct rib_head {
/* Constants */
#define RIB_MAX_RETRIES 3
+#define RT_MAXFIBS UINT16_MAX
/* Macro for verifying fields in af-specific 'struct route' structures */
#define CHK_STRUCT_FIELD_GENERIC(_s1, _f1, _s2, _f2) \
@@ -104,7 +105,7 @@ CHK_STRUCT_ROUTE_FIELDS(_ro_new); \
_Static_assert(__offsetof(struct route, ro_dst) == __offsetof(_ro_new, _dst_new),\
"ro_dst and " #_dst_new " are at different offset")
-struct rib_head *rt_tables_get_rnh(int fib, int family);
+struct rib_head *rt_tables_get_rnh(uint32_t table, sa_family_t family);
void rt_mpath_init_rnh(struct rib_head *rnh);
int rt_getifa_fib(struct rt_addrinfo *info, u_int fibnum);
void rt_setmetrics(const struct rt_addrinfo *info, struct rtentry *rt);