summaryrefslogtreecommitdiffstats
path: root/sys/nfs
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/nfs
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/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 c5bd4cb..dd76d7e 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
OpenPOWER on IntegriCloud