-
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: improvements for FIB-driven redirect path #30576
Merged
julianwiedmann
merged 2 commits into
cilium:main
from
julianwiedmann:1.16-bpf-egressgw-fib
Feb 5, 2024
Merged
egressgw: improvements for FIB-driven redirect path #30576
julianwiedmann
merged 2 commits into
cilium:main
from
julianwiedmann:1.16-bpf-egressgw-fib
Feb 5, 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
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.
needs-backport/1.15
This PR / issue needs backporting to the v1.15 branch
labels
Feb 1, 2024
/test |
julianwiedmann
changed the title
1.16 bpf egressgw fib
egressgw: improvements for FIB-driven redirect path
Feb 1, 2024
julianwiedmann
commented
Feb 1, 2024
jibi
approved these changes
Feb 2, 2024
On kernels without HAVE_FIB_IFINDEX, we need to consider that a FIB lookup with BPF_FIB_LKUP_RET_NO_NEIGH doesn't return a valid fib_params.l.ifindex (see d1c362e1dd68 ("bpf: Always return target ifindex in bpf_fib_lookup")). Instead: - for the redirect in to-netdev, we exit on the current interface. - for the redirect in from-overlay, we route via the stack. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
When the FIB lookup in to-netdev returns the same ifindex as the current interface, we want to skip the redirect. But that doesn't apply for the lookup in from-overlay - here we *always* need to redirect to the selected interface. As we previously handled the !is_defined(HAVE_FIB_IFINDEX) case, we can pass oif = 0 and trust that fib_do_redirect() will always use the ifindex from the fib_params. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
julianwiedmann
force-pushed
the
1.16-bpf-egressgw-fib
branch
from
February 5, 2024 10:18
2c51bfb
to
8b52869
Compare
/test |
ysksuzuki
approved these changes
Feb 5, 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
Feb 5, 2024
12 tasks
nbusseneau
added
backport-pending/1.15
The backport for Cilium 1.15.x for this PR is in progress.
and removed
needs-backport/1.15
This PR / issue needs backporting to the v1.15 branch
labels
Feb 8, 2024
github-actions
bot
removed
the
backport-pending/1.15
The backport for Cilium 1.15.x for this PR is in progress.
label
Feb 9, 2024
github-actions
bot
added
the
backport-done/1.15
The backport for Cilium 1.15.x for this PR is done.
label
Feb 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-done/1.15
The backport for Cilium 1.15.x for this PR is done.
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.
Iron out a few corner-cases in the new BPF-redirect logic for egressgw. This follows #26215 and #29379.