diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-12-07 09:01:59 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-12-07 10:26:00 -0500 |
| commit | a79c04e7fe6f1d0f0d6b1ad0534a47dc8fb83943 (patch) | |
| tree | 60281d0b3ea6d833f480fc6006917d0405cf6944 /bgpd/bgp_table.c | |
| parent | 60e2b4f56695fba680493cfbb61fd8d4d5b6fdf7 (diff) | |
bgpd: Convert adj_out to a RB tree
The adj_out data structure is a linked list of adjacencies
1 per update group. In a large scale env where we are
not using peer groups, this list lookup starts to become
rather costly. Convert to a better data structure for this.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_table.c')
| -rw-r--r-- | bgpd/bgp_table.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_table.c b/bgpd/bgp_table.c index 728eeaa3a9..0321412263 100644 --- a/bgpd/bgp_table.c +++ b/bgpd/bgp_table.c @@ -67,6 +67,8 @@ static struct route_node *bgp_node_create(route_table_delegate_t *delegate, { struct bgp_node *node; node = XCALLOC(MTYPE_BGP_NODE, sizeof(struct bgp_node)); + + RB_INIT(bgp_adj_out_rb, &node->adj_out); return bgp_node_to_rnode(node); } |
