]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFP r287070,r287073: split radix implementation and route table structure.
authormelifaro <melifaro@FreeBSD.org>
Mon, 25 Jan 2016 06:33:15 +0000 (06:33 +0000)
committermelifaro <melifaro@FreeBSD.org>
Mon, 25 Jan 2016 06:33:15 +0000 (06:33 +0000)
commit23582454c7061201dc41b9ab4083ccbefd5dd88c
treee3d1ff0a530bc18a45f34e089f84583c63d778c7
parent23ee6b6bf28dd68ee75ec7a21424cd765fb32fb4
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.
18 files changed:
sys/kern/vfs_export.c
sys/net/radix.c
sys/net/radix.h
sys/net/radix_mpath.c
sys/net/radix_mpath.h
sys/net/route.c
sys/net/route.h
sys/net/route_var.h [new file with mode: 0644]
sys/net/rtsock.c
sys/netinet/in_fib.c
sys/netinet/in_rmx.c
sys/netinet/in_var.h
sys/netinet6/in6_fib.c
sys/netinet6/in6_rmx.c
sys/netinet6/nd6_rtr.c
sys/netpfil/ipfw/ip_fw_table_algo.c
sys/netpfil/pf/pf_table.c
sys/nfs/bootp_subr.c