diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-12-21 04:12:19 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-01-03 14:39:55 +0100 |
commit | 7315ecdabe2e06fb75b860b65c842f0083da730e (patch) | |
tree | 44ac8ffa0df3fcdec159ac4c7e4ded03b2883f85 /pimd/pim_zebra.c | |
parent | Merge pull request #5613 from srimohans/ietf (diff) | |
download | frr-7315ecdabe2e06fb75b860b65c842f0083da730e.tar.xz frr-7315ecdabe2e06fb75b860b65c842f0083da730e.zip |
pimd: Convert the channel_oil_list|hash to a rb_tree
The channel_oil_list and hash are taking significant
cpu at scale when adding to the sorted list. Replace
with a RB_TREE.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r-- | pimd/pim_zebra.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 0417d0d06..06507b1f4 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -392,16 +392,13 @@ static void pim_zebra_vxlan_replay(void) void pim_scan_oil(struct pim_instance *pim) { - struct listnode *node; - struct listnode *nextnode; struct channel_oil *c_oil; pim->scan_oil_last = pim_time_monotonic_sec(); ++pim->scan_oil_events; - for (ALL_LIST_ELEMENTS(pim->channel_oil_list, node, nextnode, c_oil)) { + frr_each (rb_pim_oil, &pim->channel_oil_head, c_oil) pim_upstream_mroute_iif_update(c_oil, __func__); - } } static int on_rpf_cache_refresh(struct thread *t) |