-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[v1.15] bpf: ifindex trace fixes #33575
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
Merged
Merged
Conversation
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
[ upstream commit 2a0bc76 ] The encap helpers were meant to abstract from differences between TC and XDP. Therefore ctx_set_encap_info() provides the ifindex for TC, and setting the ifindex also indicates that a redirect to encap interface is possible (rather than manually adding the overlay headers + FIB lookup). The downside is that __encap_with_nodeid() for TC currently emits a trace notification without the ifindex set to ENCAP_IFINDEX. Fix this up manually by moving the `ifindex` initialization up. Reported-by: Tomasz Tarczyński <tomasz.tarczynski@isovalent.com> Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
/test-backport-1.15 |
1bb7a80
to
f152cc2
Compare
/test-backport-1.15 |
1 similar comment
/test-backport-1.15 |
[ upstream commit 7898d95 ] [ backporter's notes: minor changes to config_replacement.h and template.go to adjust for how the templating works on v1.15 ] Make the ifindex of an endpoint available to the attached BPF program, so that it can be used by a subsequent patch. We can most likely unify this later with NATIVE_DEV_IFINDEX, which is only provided for native devices. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
[ upstream commit 3c8ff5b ] ipv*_policy() takes an `ifindex` parameter, and exclusively uses it to fill trace notifications. But for some cases the provided ifindex is currently 0 (for instance in a configuration with per-EP routing, when calling from to-container). Just provide the actual interface index instead. Reported-by: Tomasz Tarczyński <tomasz.tarczynski@isovalent.com> Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
6f25ba8
to
549661d
Compare
/test-backport-1.15 |
ysksuzuki
approved these changes
Jul 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.
LGTM
aditighag
approved these changes
Jul 9, 2024
This was referenced Jul 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/1.15
This PR represents a backport for Cilium 1.15.x of a PR that was merged to main.
kind/backports
This PR provides functionality previously merged into master.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
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.
Minor adjustments in the templating patch + resolving trivial conflicts, here is a manual backport of
Once this PR is merged, a GitHub action will update the labels of these PRs: