-
Notifications
You must be signed in to change notification settings - Fork 3.4k
bpf: lb: add some test coverage for L4 proto differentiation #39386
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
julianwiedmann
merged 5 commits into
cilium:main
from
julianwiedmann:1.18-bpf-proto-diff
May 27, 2025
Merged
bpf: lb: add some test coverage for L4 proto differentiation #39386
julianwiedmann
merged 5 commits into
cilium:main
from
julianwiedmann:1.18-bpf-proto-diff
May 27, 2025
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
/test |
bdb00a7
to
b7bdd8b
Compare
/test |
@gentoo-root 👋 anyway I can help to earn your approval on these changes? :) |
So sorry, I must have lost it in my inbox! I'll review it today. |
gentoo-root
approved these changes
May 26, 2025
b7bdd8b
to
85622e7
Compare
/test |
julianwiedmann
commented
May 26, 2025
Extract a helper that hides all the compat logic for service entries without L4 protocol. While at it also clean up the hard-coded value for the ANY protocol type, so that we can be consistent about this magic number across the datapath code. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Let lb_v4_add_service_with_flags() call __lb_v4_add_service(), so that we also get the expected RevNAT entry for the service. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
A service typically is programmed with just the LB_LOOKUP_SCOPE_EXT entry. The additional LB_LOOKUP_SCOPE_INT entry is only created for services that have two scopes. Reflect this behavior in the BPF tests. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Add yet another LB helper that allows to program the LB_LOOKUP_SCOPE_EXT and LB_LOOKUP_SCOPE_INT service entries with different L4 proto values. This sounds a bit crazy, but can actually happen when the LB_LOOKUP_SCOPE_EXT entry was created on v1.16 (without L4 proto differentation), and the LB_LOOKUP_SCOPE_INT subsequently gets created on v1.17+ *with* L4 proto differentiation enabled. By flipping the service's iTP / eTP from 'Cluster' to 'Local'. As described in cilium#39358. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
This adds some coverage for various proto-differentiation scenarios. In particular the mixed-proto case from cilium#39358. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
85622e7
to
ebf0877
Compare
/test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
area/loadbalancing
Impacts load-balancing and Kubernetes service implementations
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/misc
This PR makes changes that have no direct user impact.
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.
Add some minimal BPF pieces to exercise the compat logic from #33434. Along with some refactor to contain that compat logic a bit better.