[v1.15] bpf: ifindex trace fixes#33575
Merged
aditighag merged 3 commits intocilium:v1.15from Jul 9, 2024
Merged
Conversation
[ 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>
Member
Author
|
/test-backport-1.15 |
1bb7a80 to
f152cc2
Compare
Member
Author
|
/test-backport-1.15 |
1 similar comment
Member
Author
|
/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
Member
Author
|
/test-backport-1.15 |
aditighag
approved these changes
Jul 9, 2024
This was referenced Jul 10, 2024
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.
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: