-
Notifications
You must be signed in to change notification settings - Fork 218
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
fix(conntrack): delete keys in eBPF instead of user space #831
Merged
Conversation
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
Signed-off-by: Simone Rodigari <srodigari@microsoft.com>
Signed-off-by: Simone Rodigari <srodigari@microsoft.com>
timraymond
reviewed
Oct 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty reasonable to me, but I don't feel confident approving it. @nddq should take a look.
Signed-off-by: Simone Rodigari <srodigari@microsoft.com>
nddq
requested changes
Oct 8, 2024
Signed-off-by: Simone Rodigari <srodigari@microsoft.com>
Signed-off-by: Simone Rodigari <srodigari@microsoft.com>
Signed-off-by: Simone Rodigari <srodigari@microsoft.com>
nddq
approved these changes
Oct 9, 2024
vakalapa
pushed a commit
that referenced
this pull request
Oct 9, 2024
# Description Delete TCP connections in `retina_conntrack` map directly in the eBPF layer instead of relying on the userspace process to delete it later when the connection is closing and has exceeded its lifetime. * remove `is_closing` flag from `retina_conntrack` map, update userspace and bpf program accordingly * delete connection from `retina_conntrack` map if connection is timed out or when FIN or RST flags are set * invoke `bpf_map_delete_elem` in`_ct_should_report_packet` and remove update `seen_flags` and `last_report` ## Related Issue fix #807 ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed Please add any relevant screenshots or GIFs to showcase the changes made. ## Additional Notes Add any additional notes or context about the pull request here. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project. --------- Signed-off-by: Simone Rodigari <srodigari@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/ebpf
lang/c
The C Programming Language
scope/S
Change is Small
type/enhancement
New feature or request
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.
Description
Delete TCP connections in
retina_conntrack
map directly in the eBPF layer instead of relying on the userspace process to delete it later when the connection is closing and has exceeded its lifetime.is_closing
flag fromretina_conntrack
map, update userspace and bpf program accordinglyretina_conntrack
map if connection is timed out or when FIN or RST flags are setbpf_map_delete_elem
in_ct_should_report_packet
and remove updateseen_flags
andlast_report
Related Issue
fix #807
Checklist
git commit -S -s ...
). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
Please add any relevant screenshots or GIFs to showcase the changes made.
Additional Notes
Add any additional notes or context about the pull request here.
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.