Skip to content
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: Remove fib_redirect's BPF_FIB_LOOKUP_DIRECT #24271

Merged
merged 1 commit into from
Mar 10, 2023
Merged

Conversation

borkmann
Copy link
Member

@borkmann borkmann commented Mar 9, 2023

See commit desc.

Fixes: #24252

@borkmann borkmann 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. labels Mar 9, 2023
@borkmann borkmann requested a review from a team as a code owner March 9, 2023 19:26
@borkmann
Copy link
Member Author

borkmann commented Mar 9, 2023

/test

@kvaps
Copy link
Member

kvaps commented Mar 9, 2023

I tesed this on v1.11.14, it works fine:

diff --git a/bpf/lib/fib.h b/bpf/lib/fib.h
index f24d6c7a47..24f78beb34 100644
--- a/bpf/lib/fib.h
+++ b/bpf/lib/fib.h
@@ -31,8 +31,7 @@ redirect_direct_v6(struct __ctx_buff *ctx __maybe_unused,
 	ipv6_addr_copy((union v6addr *)&fib_params.ipv6_dst,
 		       (union v6addr *)&ip6->daddr);

-	ret = fib_lookup(ctx, &fib_params, sizeof(fib_params),
-			 BPF_FIB_LOOKUP_DIRECT);
+	ret = fib_lookup(ctx, &fib_params, sizeof(fib_params), 0);
 	switch (ret) {
 	case BPF_FIB_LKUP_RET_SUCCESS:
 		break;

@borkmann thank you a lot 🙏

@borkmann
Copy link
Member Author

@borkmann thank you a lot 🙏

Thanks a lot for testing! Then yeah we should do the 0 flag by default and revisit at a later point in time to make an optional opt-in for optimizing via BPF_FIB_LOOKUP_DIRECT. But to keep default most compatible as possible.

@borkmann
Copy link
Member Author

Looks like quay.io was ratelimiting?

level=fatal msg="generating doc: creating SPDX document: generating SPDX package from image ref quay.io/cilium/hubble-relay-ci:bbe60c2d176b31afca18aeceb48932580349901a-unstripped: while downloading images to archive: downloading archive of image: writing image to disk: unable to calculate manifest: GET https://cdn03.quay.io/sha256/16/165053af1eb6099b8e6f8f779c2e22785da63d093adbbf18a76a7e0e2af7a11d?X-Amz-Algorithm=REDACTED&X-Amz-Credential=REDACTED&X-Amz-Date=REDACTED&X-Amz-Expires=REDACTED&X-Amz-Signature=REDACTED&X-Amz-SignedHeaders=REDACTED&cf_expiry=REDACTED&cf_sign=REDACTED&region=REDACTED: unexpected status code 503 Service Unavailable"

Retrigger tests..

@borkmann
Copy link
Member Author

/test

For now just do full routing lookup if users have custom tables in the wild,
and if we want to optimize it later, we could add an agent flag to opt out.

Fixes: #24252
Related: #23658
Reported-by: Wei Wei (@weiwei02)
Reported-by: Andrei Kvapil (@kvaps)
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
@borkmann
Copy link
Member Author

/test

@borkmann borkmann added the needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch label Mar 10, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.13.1 Mar 10, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.12.8 Mar 10, 2023
@borkmann borkmann added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 10, 2023
@borkmann borkmann merged commit 10deda4 into master Mar 10, 2023
@borkmann borkmann deleted the pr/fib-non-direct branch March 10, 2023 15:41
@nebril nebril added this to Needs backport from master in 1.12.9 Mar 10, 2023
@nebril nebril removed this from Needs backport from master in 1.12.8 Mar 10, 2023
@nebril nebril added this to Needs backport from master in 1.13.2 Mar 15, 2023
@nebril nebril removed this from Needs backport from master in 1.13.1 Mar 15, 2023
@NikAleksandrov NikAleksandrov mentioned this pull request Mar 20, 2023
9 tasks
@NikAleksandrov NikAleksandrov mentioned this pull request Mar 23, 2023
29 tasks
@NikAleksandrov NikAleksandrov added backport-pending/1.13 The backport for Cilium 1.13.x for this PR is in progress. and removed needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch labels Mar 23, 2023
@youngnick youngnick added backport-done/1.12 The backport for Cilium 1.12.x for this PR is done. and removed backport-pending/1.12 labels Mar 23, 2023
@jibi jibi added backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. and removed backport-pending/1.13 The backport for Cilium 1.13.x for this PR is in progress. labels Apr 7, 2023
@michi-covalent michi-covalent moved this from Needs backport from master to Backport done to v1.12 in 1.12.9 Apr 14, 2023
@gentoo-root gentoo-root moved this from Needs backport from master to Backport done to v1.13 in 1.13.2 Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.12 The backport for Cilium 1.12.x for this PR is done. backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. 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.
Projects
No open projects
1.12.9
Backport done to v1.12
1.13.2
Backport done to v1.13
Status: Released
Development

Successfully merging this pull request may close these issues.

Cilium not respecting routes in different routing tables
6 participants