diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-09-04 00:57:30 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-09-05 20:33:06 +0200 |
commit | 3f65c5b1f7db20c1ee3ab723483f294975ce2f94 (patch) | |
tree | 298e5547fd5d36b177e2d3eb31a4ff88d76a158c /bgpd/bgp_updgrp.c | |
parent | zebra: Add hash name to mpls hash (diff) | |
download | frr-3f65c5b1f7db20c1ee3ab723483f294975ce2f94.tar.xz frr-3f65c5b1f7db20c1ee3ab723483f294975ce2f94.zip |
bgpd: Add various hash optimizations
1) Add hash names to all hash_create calls
2) Fix community_hash, ecommunity_hash and lcommunity_hash key
creation
3) Fix output of community and lcommunity iterators( why would
we want to see the memory location of the backet? ).
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_updgrp.c')
-rw-r--r-- | bgpd/bgp_updgrp.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index 77e615715..9630afb71 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -84,7 +84,9 @@ static void sync_init(struct update_subgroup *subgrp) BGP_ADV_FIFO_INIT(&subgrp->sync->update); BGP_ADV_FIFO_INIT(&subgrp->sync->withdraw); BGP_ADV_FIFO_INIT(&subgrp->sync->withdraw_low); - subgrp->hash = hash_create(baa_hash_key, baa_hash_cmp, NULL); + subgrp->hash = hash_create(baa_hash_key, + baa_hash_cmp, + "BGP SubGroup Hash"); /* We use a larger buffer for subgrp->work in the event that: * - We RX a BGP_UPDATE where the attributes alone are just @@ -1549,8 +1551,10 @@ void update_bgp_group_init(struct bgp *bgp) int afid; AF_FOREACH(afid) - bgp->update_groups[afid] = - hash_create(updgrp_hash_key_make, updgrp_hash_cmp, NULL); + bgp->update_groups[afid] = + hash_create(updgrp_hash_key_make, + updgrp_hash_cmp, + "BGP Update Group Hash"); } void update_bgp_group_free(struct bgp *bgp) |