Skip to content

gatekeeper: implement our own FIB library#628

Merged
AltraMayor merged 13 commits intomasterfrom
mfib
Feb 14, 2023
Merged

gatekeeper: implement our own FIB library#628
AltraMayor merged 13 commits intomasterfrom
mfib

Conversation

@AltraMayor
Copy link
Owner

This pull request replaces the DPDK libraries rte_lpm and rte_lpm6 with our own FIB library. The motivation for this effort are bugs found in rte_lpm6. Pull request #618 has tried to avoid these bugs by adopting rte_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_lpm6 with rte_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.

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.
@AltraMayor AltraMayor added bug enhancement Production requirement Either the issue is solved, or Gatekeeper doesn't work in production labels Jan 31, 2023
@AltraMayor AltraMayor added this to the Version 1.1 milestone Jan 31, 2023
@AltraMayor AltraMayor marked this pull request as ready for review February 2, 2023 18:46
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.
@AltraMayor
Copy link
Owner Author

This pull request has had its code reviewed and tested. The next step is to homologate it in production.

@AltraMayor AltraMayor merged commit 0e1d8de into master Feb 14, 2023
@AltraMayor AltraMayor deleted the mfib branch February 14, 2023 13:23
@AltraMayor
Copy link
Owner Author

This pull request has been successfully homologated in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug enhancement Production requirement Either the issue is solved, or Gatekeeper doesn't work in production

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant