bpf: lb: split up lb*_local() into backend selection / DNAT operation#42973
Merged
julianwiedmann merged 4 commits intomainfrom Nov 26, 2025
Merged
bpf: lb: split up lb*_local() into backend selection / DNAT operation#42973julianwiedmann merged 4 commits intomainfrom
julianwiedmann merged 4 commits intomainfrom
Conversation
When a tailcall fails, don't fall through into the subsequent error checks. Doing so is brittle. Signed-off-by: Julian Wiedmann <[email protected]>
Some of these error conditions only apply for lb4_local(), and not for lb4_to_lb6(). Fine-tune the condition checks so that it looks a bit more like the IPv6 path. Signed-off-by: Julian Wiedmann <[email protected]>
We're updating the CT tuple so that it reflects the actual packet headers after DNAT. So if we exit *before* the rewrite happens, let's not update the tuple. Signed-off-by: Julian Wiedmann <[email protected]>
This function is shared amongst bpf_lxc and nodeport.h, and implements the whole sequence of backend selection and DNAT for a service request. But there's a bunch of code in it that actually only applies to *one* of the callers. Let's make it easier to refactor by splitting this massive function into two pieces - one that selects the backend, the other that takes the backend as input and applies the DNAT. With room in-between to run the caller-specific pieces (LRP + loopback for bpf_lxc, all sorts of skip/punt cases for nodeport.h). Signed-off-by: Julian Wiedmann <[email protected]>
9038af7 to
4723c05
Compare
Member
Author
|
/test |
YutaroHayakawa
approved these changes
Nov 25, 2025
nezdolik
pushed a commit
to nezdolik/cilium
that referenced
this pull request
Jan 14, 2026
- `go mod tidy && go mod vendor && go mod verify` - `cd enterprise/hubble-timescape && go mod tidy && cd ../..` - fixed minor conflicts in `bpf/bpf_lxc.c`, `bpf/bpf_overlay.c` and `bpf/lib/nodeport.h` so that both new OSS code and previous Enterprise includes are present - fixed conflicts in `pkg/datapath/config/host_config.go`, `pkg/datapath/config/lxc_config.go` and `pkg/datapath/config/overlay_config.go` - adapted `enterprise/pkg/maps/extepspolicy/table.go`, `enterprise/pkg/fqdnha/relay/namemanager.go` and `enterprise/pkg/maps/extepspolicy/writer_test.go` due to function signature changes in OSS - `git cherry-pick -n 3d4abeb61b72d910c58ddb199b189c86c4eaf326 71023768865b9085e6aa8991c553997e1cc6f9b8` to pick up patches from @rastislavs (+ manual added fix in `enterprise/pkg/bgpv1/manager/reconcilerv2/neighbor_test.go` based on patch changes) - `make -C images update-builder-image update-runtime-image` - `make -C Documentation update-cmdref` - `./contrib/scripts/enterprise-testowners.sh` - remove duplicate `Cleanup Disk space in runner` step in `.github/workflows/cilium-cli.yaml` - fix mindfulness issues by manually fixing stuff coming from the following PRs: - [cilium#42169](cilium#42169) - [cilium#42011](cilium#42011) - [cilium#42012](cilium#42012) - `make generate-enterprise-apis` ~- adjusted `enterprise/pkg/ingresspolicy` after commit 2faed3a ("policy: fix selector policy leak and detachment issues") removed the implicit addition of the identity on lookup. Now the identity needs to be added and removed in the identity manager.~ Split into separate PR isovalent/cilium#9506 to ease review and backporting. - Set `clustermesh.config.enabled=true` in enterprise-clustermesh-overlapping-podcidr workflow following commit 562ba2c ("clustermesh: set authMode to migration by default"). - Had to revert the following commits because they break the ILB CI workflow. Thanks to @mhofstetter for bisecting! See discussion for more details. Upstream fix and re-applying the changes is tracked in isovalent/cilium#9511. - cilium#42986 - 6781758 - 3cfe7a1 - a8fd4ed - 64e171e - cilium#42973 - c171f22 (with minor conflict resolution) - 9530af5 - not necessary to revert the last 2 commit of that PR
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.
(Motivation is to flesh out which special-cases apply to which caller, and to isolate the LRP-specific handling to
bpf_lxc. This will help with convertingENABLE_LOCAL_REDIRECT_POLICYto a load-time config).