-
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
egressgw: minor bpf refactors #32094
Merged
julianwiedmann
merged 3 commits into
cilium:main
from
julianwiedmann:1.16-bpf-egressgw-refactor
Apr 24, 2024
Merged
egressgw: minor bpf refactors #32094
julianwiedmann
merged 3 commits into
cilium:main
from
julianwiedmann:1.16-bpf-egressgw-refactor
Apr 24, 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
…rect() Cleanly split up the EgressGW policy lookup, and the subsequent ipcache lookup. No functional change. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
julianwiedmann
added
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
release-note/misc
This PR makes changes that have no direct user impact.
feature/egress-gateway
Impacts the egress IP gateway feature.
labels
Apr 19, 2024
/test |
Introduce a slightly better separation between 1. interpreting the CT result, 2. performing the actual EGW policy lookup & evaluation, 3. determining whether the selected gateway is local or remote. Also allow the policy lookup to return a DROP_* reason, without intermediate transport via the tunnel_endpoint variable. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
EGW is incompatible with IPsec, and so __encap_and_redirect_lxc() will never return CTX_ACT_OK. We currently also *can't* pass the packet to the stack for encryption, as there's no code in bpf_host that would catch it and handle the EGW redirect to the gateway node. Therefore remove the unused & confusing code. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
julianwiedmann
force-pushed
the
1.16-bpf-egressgw-refactor
branch
from
April 19, 2024 16:31
4eebde0
to
336322a
Compare
/test |
julianwiedmann
added
the
dont-merge/preview-only
Only for preview or testing, don't merge it.
label
Apr 21, 2024
ysksuzuki
approved these changes
Apr 22, 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! Thanks
julianwiedmann
removed
the
dont-merge/preview-only
Only for preview or testing, don't merge it.
label
Apr 23, 2024
ysksuzuki
approved these changes
Apr 24, 2024
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 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature/egress-gateway
Impacts the egress IP gateway feature.
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.
This slightly refactors some of the EGW bpf code, so that we have low-level EGW helpers that are only concerned about the map lookup & interpreting the result. High-level logic (ie. EGW only handles outbound connections) gets applied independently of what the policy mechanism looks like, and error propagation is more straight-forward.