summaryrefslogtreecommitdiff
path: root/pimd/pim_oil.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-12-20 23:00:31 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2020-01-03 08:39:55 -0500
commitdd3364cb1aa265ec0310e8ed8adffac16f6fb24e (patch)
treedb4bb6a717a812aa73361ab9fb55a11fabff3163 /pimd/pim_oil.c
parent7315ecdabe2e06fb75b860b65c842f0083da730e (diff)
pimd: Convert the upstream_list and hash to a rb tree
Convert the upstream_list and hash to a rb tree, Significant time was being spent in the listnode_add_sort. This reduces this time greatly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_oil.c')
-rw-r--r--pimd/pim_oil.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c
index 5af3328a1a..598988f88f 100644
--- a/pimd/pim_oil.c
+++ b/pimd/pim_oil.c
@@ -86,26 +86,6 @@ int pim_channel_oil_compare(const struct channel_oil *c1,
return 0;
}
-static bool pim_oil_equal(const void *arg1, const void *arg2)
-{
- const struct channel_oil *c1 = (const struct channel_oil *)arg1;
- const struct channel_oil *c2 = (const struct channel_oil *)arg2;
-
- if ((c1->oil.mfcc_mcastgrp.s_addr == c2->oil.mfcc_mcastgrp.s_addr)
- && (c1->oil.mfcc_origin.s_addr == c2->oil.mfcc_origin.s_addr))
- return true;
-
- return false;
-}
-
-static unsigned int pim_oil_hash_key(const void *arg)
-{
- const struct channel_oil *oil = arg;
-
- return jhash_2words(oil->oil.mfcc_mcastgrp.s_addr,
- oil->oil.mfcc_origin.s_addr, 0);
-}
-
void pim_oil_init(struct pim_instance *pim)
{
rb_pim_oil_init(&pim->channel_oil_head);