Introduce DXR as an IPv4 longest prefix matching / FIB moduleDXR maintains compressed lookup structures with a trivial searchprocedure. A two-stage trie is indexed by the more significant bits of
Introduce DXR as an IPv4 longest prefix matching / FIB moduleDXR maintains compressed lookup structures with a trivial searchprocedure. A two-stage trie is indexed by the more significant bits ofthe search key (IPv4 address), while the remaining bits are used forfinding the next hop in a sorted array. The tradeoff between memoryfootprint and search speed depends on the split between the trie andthe remaining binary search. The default of 20 bits of the key beingused for trie indexing yields good performance (see below) withfootprints of around 2.5 Bytes per prefix with current BGP snapshots.Rebuilding lookup structures takes some time, which is compensated for bybatching several RIB change requests into a single FIB update, i.e. FIBsynchronization with the RIB may be delayed for a fraction of a second.RIB to FIB synchronization, next-hop table housekeeping, and locklesslookup capability is provided by the FIB_ALGO infrastructure.DXR works well on modern CPUs with several MBytes of caches, especiallyin VMs, where is outperforms other currently available IPv4 FIBalgorithms by a large margin.Reviewed by: melifaroMFC after: 1 weekDifferential Revision: https://reviews.freebsd.org/D29821(cherry picked from commit 2aca58e16f507bfcad127a0865a9d5c75c5eedc3)
show more ...