summaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2016-01-25 06:33:15 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2016-01-25 06:33:15 +0000
commit61eee0e202c2bda75971193c95d870e6148a6152 (patch)
treee3d1ff0a530bc18a45f34e089f84583c63d778c7 /sys/nfs
parent51f6f18c88deda7b3dc79ccef5fe008170380277 (diff)
downloadsrc-test2-61eee0e202c2bda75971193c95d870e6148a6152.tar.gz
src-test2-61eee0e202c2bda75971193c95d870e6148a6152.zip
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.
Notes
Notes: svn path=/head/; revision=294706
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/bootp_subr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c
index c5bd4cb5fc7c..dd76d7ed90b2 100644
--- a/sys/nfs/bootp_subr.c
+++ b/sys/nfs/bootp_subr.c
@@ -65,6 +65,9 @@ __FBSDID("$FreeBSD$");
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
+#ifdef BOOTP_DEBUG
+#include <net/route_var.h>
+#endif
#include <netinet/in.h>
#include <netinet/in_var.h>
@@ -369,15 +372,15 @@ bootpboot_p_tree(struct radix_node *rn)
void
bootpboot_p_rtlist(void)
{
- struct radix_node_head *rnh;
+ struct rib_head *rnh;
printf("Routing table:\n");
rnh = rt_tables_get_rnh(0, AF_INET);
if (rnh == NULL)
return;
- RADIX_NODE_HEAD_RLOCK(rnh); /* could sleep XXX */
+ RIB_RLOCK(rnh); /* could sleep XXX */
bootpboot_p_tree(rnh->rnh_treetop);
- RADIX_NODE_HEAD_RUNLOCK(rnh);
+ RIB_RUNLOCK(rnh);
}
void