Avoid verifying tail call programs for disabled features #41421
Merged
ti-mo merged 3 commits intocilium:mainfrom Sep 14, 2025
Merged
Avoid verifying tail call programs for disabled features #41421ti-mo merged 3 commits intocilium:mainfrom
ti-mo merged 3 commits intocilium:mainfrom
Conversation
2224b25 to
cd1d41c
Compare
Member
Author
|
/test |
We already had logic to prune statically unreachable tail calls, tail calls which were unreachable due to compile time macros. However, we did not prune tail calls which were unreachable due to load time config. This commit updates the existing logic to also prune tail calls which are unreachable due to load time config. This should allow us to migrate macros that control reachability of tail calls to load time config. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com> Signed-off-by: Timo Beckers <timo@isovalent.com>
Move the logic for pruning unused tail calls from collection.go to a new file. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
The `LoadCollectionSpec` function was a wrapper around `ebpf.LoadCollectionSpec` that additionally did the unused tail call pruning. Now that this functionality has been moved into the `LoadCollection` function, this wrapper is no longer needed. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
cd1d41c to
f66f746
Compare
ti-mo
approved these changes
Sep 11, 2025
Contributor
ti-mo
left a comment
There was a problem hiding this comment.
Thanks! I've removed map entrypoints and map window, I think the latter kept appending to the backing array, which is fairly costly per-insn.
I'll do some refactoring on this per #41628, but let's get this merged so the clang-free work on the bpf codebase can start.
Contributor
|
/test |
2 tasks
ysksuzuki
approved these changes
Sep 11, 2025
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.
We already had logic to prune statically unreachable tail calls, tail calls which were unreachable due to compile time macros. However, we did not prune tail calls which were unreachable due to load time config.
This commit updates the existing logic to also prune tail calls which are unreachable due to load time config. This should allow us to migrate macros that control reachability of tail calls to load time config.
Fixes: #38378