Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: optimize DropReason eBPF map lookups (#730)
# Description For all eBPF program in the DropReason plugin (except `inet_csk_accept` which has issue we need to investigate #715): - only make ebpf map calls when necessary - omit setting some packet fields to 0 right after `memset` is called on the entire struct **Details**: Previously, we did a map lookup regardless of whether the input `retVal` indicated a drop. Now, only for drops. We also skip a map delete when there wasn't a earlier kprobe that saved the corresponding PID. ## 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. Signed-off-by: Igor Klemenski <igor.klemenski@microsoft.com>
- Loading branch information