]> git.puffer.fish Git - mirror/frr.git/commit
lib: table: use hash for exact-match lookups
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 6 Jul 2017 15:30:04 +0000 (17:30 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 11 Jul 2017 11:47:31 +0000 (13:47 +0200)
commit736ac221d1e89f3f35703d5175057404de62b50b
tree8a0f11fb5de225b50ae2d02281d13d59ca8ec2dc
parentbc7a2c035aa2d8d2820503fb8b7c8328b28bdde4
lib: table: use hash for exact-match lookups

Most read accesses of route_table are actually exact matches where
walking down the tree is wildly inefficient.  Use a parallel hash
structure instead.

This significantly speeds up processes that are performance-bound by
table accesses, e.g. BGP withdraw processing.  In other locations, the
improvement is not seen as strongly, e.g. when filter processing is the
limiting factor.

[includes fix to ignore prefix host bits in hash comparison]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/table.c