Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fib: review lock requirements #606

Merged
merged 5 commits into from
Sep 20, 2022
Merged

fib: review lock requirements #606

merged 5 commits into from
Sep 20, 2022

Conversation

AltraMayor
Copy link
Owner

The code around the FIB has tried to do some of the work related to adding and removing entries without holding a lock. The intention was to be faster, but the savings are small since there are way more readers than writers. Moreover, the risk of crashing Gatekeeper is too high. This pull request conservatively protects this code by acquiring the lock before it.

In addition, all FIB lookups that are not for incoming packets are rewritten to use the Routing Information Base added in pull request #594. This prepares Gatekeeper to eventually support NICs that can offload LPM lookups.

@AltraMayor AltraMayor added the Operational demand This issue would make Gatekeeper safer and/or cheaper to operate label Sep 15, 2022
@AltraMayor AltraMayor added this to the Version 1.1 milestone Sep 15, 2022
@AltraMayor AltraMayor marked this pull request as draft September 16, 2022 12:14
new_route() and del_route() were not safely handling the lock of
the RIB.
Replace lpm_lookup_ipv4() and lpm_lookup_ipv6() with rib_lookup().
lpm_lookup_ipv4() and lpm_lookup_ipv6() are now only used to
look up destination addresses in packets. This prepares the code
to eventually support SmartNICs that can offload LPM lookups.
@AltraMayor AltraMayor marked this pull request as ready for review September 20, 2022 19:00
@AltraMayor AltraMayor merged commit a573402 into master Sep 20, 2022
@AltraMayor AltraMayor deleted the syn-fib branch September 20, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Operational demand This issue would make Gatekeeper safer and/or cheaper to operate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant