Skip to content

bpf: egressgw: modernize the FIB-driven redirect path #39781

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
merged 2 commits into from
May 30, 2025

Conversation

julianwiedmann
Copy link
Member

@julianwiedmann julianwiedmann commented May 29, 2025

Now that we can require that the neigh-resolver is available in this code path (since the egress_gw_fib_lookup_and_redirect() helper is only called from TC context), there's potential to remove some unused fallback code & handling in bpf_overlay.

We now strictly require that the underlying kernel supports
bpf_redirect_neigh(). As this function is only called from TC context
(and therefore has access to this helper), we can now remove the fallback
paths.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
When called by from-overlay, the helper now returns either an error or
CTX_ACT_REDIRECT. There's no more fallthrough to the host networking path
with CTX_ACT_OK.

Remove the code that supported this fallthrough path.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann requested review from a team as code owners May 29, 2025 09:30
@julianwiedmann julianwiedmann requested a review from rgo3 May 29, 2025 09:30
@julianwiedmann julianwiedmann added area/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 May 29, 2025
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann enabled auto-merge May 29, 2025 09:44
Copy link
Contributor

@rgo3 rgo3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@julianwiedmann julianwiedmann added this pull request to the merge queue May 30, 2025
@maintainer-s-little-helper 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 May 30, 2025
Merged via the queue into cilium:main with commit 07e36ae May 30, 2025
77 checks passed
@julianwiedmann julianwiedmann deleted the 1.18-bpf-egw-cleanup branch May 30, 2025 23:02
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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants