summaryrefslogtreecommitdiffstats
path: root/sys/net/radix_mpath.h
diff options
context:
space:
mode:
authormelifaro <melifaro@FreeBSD.org>2016-01-25 06:33:15 +0000
committermelifaro <melifaro@FreeBSD.org>2016-01-25 06:33:15 +0000
commit23582454c7061201dc41b9ab4083ccbefd5dd88c (patch)
treee3d1ff0a530bc18a45f34e089f84583c63d778c7 /sys/net/radix_mpath.h
parent23ee6b6bf28dd68ee75ec7a21424cd765fb32fb4 (diff)
downloadFreeBSD-src-23582454c7061201dc41b9ab4083ccbefd5dd88c.zip
FreeBSD-src-23582454c7061201dc41b9ab4083ccbefd5dd88c.tar.gz
MFP r287070,r287073: split radix implementation and route table structure.
There are number of radix consumers in kernel land (pf,ipfw,nfs,route) with different requirements. In fact, first 3 don't have _any_ requirements and first 2 does not use radix locking. On the other hand, routing structure do have these requirements (rnh_gen, multipath, custom to-be-added control plane functions, different locking). Additionally, radix should not known anything about its consumers internals. So, radix code now uses tiny 'struct radix_head' structure along with internal 'struct radix_mask_head' instead of 'struct radix_node_head'. Existing consumers still uses the same 'struct radix_node_head' with slight modifications: they need to pass pointer to (embedded) 'struct radix_head' to all radix callbacks. Routing code now uses new 'struct rib_head' with different locking macro: RADIX_NODE_HEAD prefix was renamed to RIB_ (which stands for routing information base). New net/route_var.h header was added to hold routing subsystem internal data. 'struct rib_head' was placed there. 'struct rtentry' will also be moved there soon.
Diffstat (limited to 'sys/net/radix_mpath.h')
-rw-r--r--sys/net/radix_mpath.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/radix_mpath.h b/sys/net/radix_mpath.h
index 0a0ed74..2b0d442 100644
--- a/sys/net/radix_mpath.h
+++ b/sys/net/radix_mpath.h
@@ -44,11 +44,13 @@
struct route;
struct rtentry;
struct sockaddr;
-int rn_mpath_capable(struct radix_node_head *);
+struct rib_head;
+int rt_mpath_capable(struct rib_head *);
+int rn_mpath_capable(struct radix_head *);
struct radix_node *rn_mpath_next(struct radix_node *);
u_int32_t rn_mpath_count(struct radix_node *);
struct rtentry *rt_mpath_matchgate(struct rtentry *, struct sockaddr *);
-int rt_mpath_conflict(struct radix_node_head *, struct rtentry *,
+int rt_mpath_conflict(struct rib_head *, struct rtentry *,
struct sockaddr *);
void rtalloc_mpath_fib(struct route *, u_int32_t, u_int);
struct rtentry *rt_mpath_select(struct rtentry *, uint32_t);
OpenPOWER on IntegriCloud