Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change route table rib to be a radix tree instead of NodeMap
Summary: The crux of the change here is replacing NodeMap rib with a radix tree. This makes the lookups much faster than scanning the node map for LPM. Clone and publish apis have been implemented to publish and clone contained routes. We still use NodeMap when computing RouteTable deltas so we take the rib and convert it into a NodeMap during delta computation. Yogi is looking at more optimal ways of doing radix tree diffs. There is some janky ness here with ownership for these on the fly NodeMaps being passed to NodeMapDelta, we could perhaps do better with template type traits and just pass unique_ptrs in this case. But we may revise this if we get to a better approach of diffing radix trees anyways. Another change is when deduping routes we can't rely on ribs being NodeMaps. So I do the following - For all routes that are in both oldRib and newRib a) If attributes are same, copy oldRoute into the newRib b) If attributes are different inherit generation number If any route from oldRib does not exist in newRib, or if the sizes are different we consider the ribs as not being same. This probably needs more polishing, but sending it out for early feedback. Reviewed By: yogeshwer Differential Revision: D2436211 fb-gh-sync-id: b3bec59f8fd4e818b23e0567da72928ebb61fd67
- Loading branch information
Jasmeet Bagga
authored and
facebook-github-bot-7
committed
Dec 16, 2015
1 parent
f806681
commit c77b627
Showing
11 changed files
with
292 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.