summaryrefslogtreecommitdiffstats
path: root/sys/net/rtable.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename rt_mpath_next() into rtable_mpath_next() and provide anmpi2015-11-061-3/+17
| | | | | implementation for ART based on the singly-linked list of route entries.
* Use a SLIST instead of a LIST for MPATH route entries with ART.mpi2015-11-061-27/+30
|
* In ART separate the MPATH delete case to properly recover if art_delete()mpi2015-11-061-22/+38
| | | | | | | | does not find a matching node. This currently never happens because we always do a route lookup before calling rtable_delete(). Yes this is odd & due to the way multipath is implemented in the radix tree.
* Initialize the correct variable in ART's rtable_match().mpi2015-11-041-3/+3
|
* Some tweaks to build the rtable API and backends in userland.mpi2015-11-041-1/+5
| | | | Needed by the regression tests.
* Call rtable_put(), a stub for now, before leaving a function that calledmpi2015-11-041-55/+105
| | | | rtable_get().
* Merge rtable_mpath_match() into rtable_lookup().mpi2015-11-021-50/+30
| | | | ok bluhm@
* Merge rtable_mpath_conflict() into rtable_insert().mpi2015-10-251-61/+37
| | | | ok claudio@
* Use only one refcounting mechanism for route entries.mpi2015-10-221-2/+6
| | | | ok bluhm@, dlg@, claudio@
* Return the correct error code when a table already exists.mpi2015-10-211-2/+5
|
* Rewrite the logic around the dymanic array of routing tables to helpmpi2015-10-141-82/+126
| | | | | | | | | | | | | | | turning rtable_get(9) MP-safe. Use only one per-AF array, as suggested by claudio@, pointing to an array of pointers to the routing table heads. Routing tables are now allocated/initialized per-AF. This will let us allocate routing table on-demand instead of always having an AF_INET, AF_MPLS and AF_INET table as soon as a new rtableID is used. This also get rid of the "void ***" madness. ok dlg@, jmatthew@
* Make rtable_get() private to ensure it won't be used outside ofmpi2015-10-071-1/+2
| | | | | | | | | net/rtable.c. This will ease the introduction of rtable_put(). Routing tables are mapped to a tuple (idx, af) so the public API should as much as possible require these two keys. ok dlg@
* Initialize the routing table before domains.mpi2015-10-071-39/+166
| | | | | | | | | | | | | | | | | | | | | | | The routing table is not an optional component of the network stack and initializing it inside the "routing domain" requires some ugly introspection in the domain interface. This put the rtable* layer at the same level of the if* level. These two subsystem are organized around the two global data structure used in the network stack: - the global &ifnet list, to be used in process context only, and - the routing table which can be read in interrupt context. This change makes the rtable_* layer domain-aware and extends the "struct domain" such that INET, INET6 and MPLS can specify the length of the binary key used in lookups. This allows us to keep, or move towards, AF-free route and rtable layers. While here stop the madness and pass the size of the maximum key length in *byte* to rn_inithead0(). ok claudio@, mikeb@
* Move the reference counting of a newly created route entry insidempi2015-10-071-1/+5
| | | | | | rtable_insert(). inputs and ok bluhm@
* Use the radix-tree API instead of function pointers.mpi2015-09-281-6/+6
|
* Factors ou the route hashing code to implement Equal-Cost Multi-Pathmpi2015-09-281-32/+89
| | | | | | | | for ART. While here sync the two remaining mix() macros. ok chris@, dlg@
* Use rtref(9) in rtable_match() before returning a route entry.mpi2015-09-121-3/+11
| | | | ok bluhm@, claudio@
* Introduce rtref(9) use it in rtable_lookup() before returning a routempi2015-09-111-8/+25
| | | | | | entry. ok bluhm@, claudio@
* Make every subsystem using a radix tree call rn_init() and pass thempi2015-09-041-4/+4
| | | | | | | | | | | | | | | length of the key as argument. This way every consumer of the radix tree has a chance to explicitly initialize the shared data structures and no longer rely on another subsystem to do the initialization. As a bonus ``dom_maxrtkey'' is no longer used an die. ART kernels should now be fully usable because pf(4) and IPSEC properly initialized the radix tree. ok chris@, reyk@
* Make ART internals free of 'struct sockaddr'.mpi2015-08-201-10/+44
| | | | | | | | | | Keep route entry/BSD compatibility goos in the rtable layer. The way addresses and masks (prefix-lengths) are encoded is really tied to the radix-tree implementation. Since we decided to no longer support non-contiguous masks, we could get rid of some extra "sockaddr" allocations and reduce the memory grows related to the use of a multibit-trie.
* Import an alternative routing table backend based on Yoichi Hariguchi'smpi2015-08-201-1/+455
| | | | | | | | | | | | | | | | | | | | | | | | | ART implementation. ART (Allotment Routing Table) is a multibit-trie algorithm invented by D. Knuth while reviewing Yoichi's SMART [0] (Smart Multi-Array Routing Table) paper. This implementation, unlike the one from the KAME project, supports variable stride lengths which makes it easier to adapt the consumed memory/speed trade-off. It also let you use a bigger first-level table, what other algorithms such as POPTRIE [1] need to implement separately. Adaptation to the OpenBSD kernel has been done with two different data structures. ART nodes and route entries are managed separately which makes the algorithm implementation free of any MULTIPATH logic. This implementation does not include Path Compression. [0] http://www.hariguchi.org/art/smart.pdf [1] http://conferences.sigcomm.org/sigcomm/2015/pdf/papers/p57.pdf ok dlg@, reyk@
* Abstract the routing table internals behind an rtable_* API.mpi2015-07-181-0/+204
Code abusing the radix internals for the routing table should now includes <net/rtable.h> and only deal with "struct rtentry". Code using a radix tree for another purpose can still include <net/radix.h>. Inputs from and ok claudio@, mikeb@