]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_aspath.c
hash: force size to be a power of 2
authorStephen Hemminger <shemminger@vyatta.com>
Fri, 4 Jan 2013 22:29:21 +0000 (22:29 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sun, 24 Feb 2013 19:42:40 +0000 (20:42 +0100)
commit90645f5598ca8b25cd2692f2ac0d2778a3fd2755
tree2b5e67b020eb3f7a2fd9df4faf2f0914e0cbf0cf
parent44a86a0278c1678fd4b8dfa56c4f5f2feb6df3ad
hash: force size to be a power of 2

By forcing the hash table size to be a power of 2, a potentially
expensive divide can be replaced by a mask operation. Almost all
usage of the hash table was using default size of 1024. Only places
with different size was thread library (1011) and bgp aspath.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_aspath.c
lib/hash.c
lib/hash.h
lib/thread.c