gatekeeper: implement our own FIB library#628
Merged
AltraMayor merged 13 commits intomasterfrom Feb 14, 2023
Merged
Conversation
The macro G_LOG() in header "gatekeeper_main.h" uses the function rte_lcore_id(), which is defined in header <rte_lcore.h>.
The original code in gk/fib.c was meant to only use a FIB library, but it currently uses a FIB and RIB library. Therefore, not only is renaming it to gk/rt.c (RT is short for routing) more meaningful, but it also frees the prefix fib for implementing a FIB library in Gatekeeper.
Add an option to bound RIB's longer iterator to the child prefixes of the parent prefix.
Besides adding fib_add() and fib_delete(), this commit enhances lib/rib's longer iterator by adding rib_longer_iterator_seek() and rib_longer_iterator_skip_branch(), which increase the number of use cases of the longer iterator.
This commit replaces the backend libraries rte_lpm and rte_lpm6 with the new FIB library to provide Lua policies with LPM tables. Thanks to the new RIB and FIB libraries, the zero-length prefix (AKA the default route) is now supported.
This commit replaces the backend libraries rte_lpm and rte_lpm6 with the new FIB library to implement the routing table. Thanks to the new RIB and FIB libraries, the zero-length prefix (AKA the default route) is now supported. This commit closes #91.
Before this patch, the functions that maintain the routing table were (1) returning -1 instead of a proper error code, and (2) not passing up error codes obtained from called functions.
The functions lpm_debug_lookup() and lpm6_debug_lookup() enable one to investigate the correctness of the implementation of the RIB and FIB through Lua policies.
Owner
Author
|
This pull request has had its code reviewed and tested. The next step is to homologate it in production. |
Owner
Author
|
This pull request has been successfully homologated in production. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request replaces the DPDK libraries
rte_lpmandrte_lpm6with our own FIB library. The motivation for this effort are bugs found inrte_lpm6. Pull request #618 has tried to avoid these bugs by adoptingrte_fib6, but tests have shown that this newer DPDK library has other bugs.Given that our FIB library was crafted to meet the exact needs of Gatekeeper, it brings advantages that were not previously available. Our FIB library supports IPv4 and IPv6 with the same code. This unification enables generalized code for IPv4 and IPv6, which simplifies Gatekeeper's codebase, and improves reliability since code run with IPv4 and IPv6 helps to test both stacks. Our FIB library may use fewer tbl8s when there are multiple rules with the same next hop by checking that each tbl8 will make a difference in the lookup. This feature is significant on Grantor servers, on which prefixes from thread intelligence fit this pattern. And, like the newer DPDK libraries
rte_lpm6withrte_fib6, our FIB library supports the zero-length prefix. This feature will simplify the configuration of some Gatekeeper servers.This pull request supersedes pull request #618.