-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
bpf: nodeport: split off LB logic in nodeport_lb*() #31590
Merged
jibi
merged 2 commits into
cilium:main
from
julianwiedmann:1.16-bpf-nodeport-svc-extract
Apr 3, 2024
Merged
bpf: nodeport: split off LB logic in nodeport_lb*() #31590
jibi
merged 2 commits into
cilium:main
from
julianwiedmann:1.16-bpf-nodeport-svc-extract
Apr 3, 2024
Conversation
This file contains 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
Use positive logic in the "use identity forward?" condition. Also limit the additional sanity-checks for the forwarded identity to this code path. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
nodeport_lb*() has grown into a massive function, and its current code flow is rather confusing: if (is-svc-request) { /* do svc stuff */ } else { /* do other stuff and return */ } /* do more svc stuff */ Clean this up by pulling all the SVC logic into a separate function. Long-term this will make it easier to configure BPF masquerading independently from ENABLE_NODEPORT. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
maintainer-s-little-helper
bot
added
the
dont-merge/needs-release-note-label
The author needs to describe the release impact of these changes.
label
Mar 25, 2024
julianwiedmann
added
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
kind/cleanup
This includes no functional changes.
release-note/misc
This PR makes changes that have no direct user impact.
area/loadbalancing
Impacts load-balancing and Kubernetes service implementations
labels
Mar 25, 2024
maintainer-s-little-helper
bot
removed
the
dont-merge/needs-release-note-label
The author needs to describe the release impact of these changes.
label
Mar 25, 2024
/test |
julianwiedmann
changed the title
1.16 bpf nodeport svc extract
bpf: nodeport: split off LB logic in nodeport_lb*()
Mar 26, 2024
No clue why the diff for |
jibi
approved these changes
Apr 3, 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.
- all the svc logic moved into
nodeport_svc_lb{4,6}
- some extra churn due to some values becoming pointers
- the else branch for the is-not-svc-request case always returned or tailcall'd into another func so should be fine to move all the svc logic inside the is-svc-request branch
LGTM
maintainer-s-little-helper
bot
added
the
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
label
Apr 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/loadbalancing
Impacts load-balancing and Kubernetes service implementations
kind/cleanup
This includes no functional changes.
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.
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
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.
Navigating this particular function is confusing, and to support #13732 we'll eventually need to cleanly split the LB / NAT paths anyway. So let's bite the bullet and go ahead with it.