summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2017-07-31 23:22:23 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2017-07-31 23:22:23 +0200
commit40520c3649dc9d556b3a11f1d60e84130cebf487 (patch)
tree22a1ee7b22142e9fe49caec66da2bcfa7bce6aa4 /m4
parentMerge pull request #866 from opensourcerouting/ldpd-config-issues (diff)
downloadfrr-40520c3649dc9d556b3a11f1d60e84130cebf487.tar.xz
frr-40520c3649dc9d556b3a11f1d60e84130cebf487.zip
bgpd: peer hash expands until we are out of memory
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> swpX peers all start out with the same sockunion so initially they all go into the same hash bucket. Once IPv6 ND has worked its magic they will have different sockunions and will go in different buckets...life is good. Until then though, we are in a phase where all swpX peers have the same socknunion. Once we have HASH_THRESHOLD (10) swpX peers and call hash_get for a new swpX peer the hash code calls hash_expand(). This happens because there are more than HASH_THRESHOLD entries in a single bucket so the logic is "expand the hash to spread things out"...in our case expanding doesn't spread out the swpX peers because all of their sockunions are the same. I looked at having peer_hash_make and peer_hash_same consider the ifname of the swpX peer but that is a large change that we don't want to make at the moment. So the fix is to put a cap on how large we are willing to let the hash table get. By default there is no limit but if max_size is set we will not allow the hash to expand above that.
Diffstat (limited to 'm4')
0 files changed, 0 insertions, 0 deletions