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
[1.15] reproducible bpf unit tests, tcx downgrade, stable testdata #31663
Merged
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
ti-mo
added
kind/backports
This PR provides functionality previously merged into master.
backport/1.15
This PR represents a backport for Cilium 1.15.x of a PR that was merged to main.
labels
Mar 28, 2024
ti-mo
had a problem deploying
to
release-base-images
March 28, 2024 15:52
— with
GitHub Actions
Error
ti-mo
force-pushed
the
pr/v1.15-backport-2024-03-28-02-32
branch
from
March 28, 2024 16:04
eb7eac8
to
38e782c
Compare
ti-mo
had a problem deploying
to
release-base-images
March 28, 2024 16:04
— with
GitHub Actions
Error
ti-mo
changed the title
v1.15 Backports 2024-03-28
[1.15] reproducible bpf unit tests, tcx downgrade, stable testdata
Mar 28, 2024
/test-backport-1.15 |
/test-backport-1.15 |
christarazi
approved these changes
Mar 28, 2024
julianwiedmann
added
the
dont-merge/needs-rebase
This PR needs to be rebased because it has merge conflicts.
label
Apr 1, 2024
[ upstream commit 1409a37 ] replaceNetworkDatapath() is only called from one place and adds an additional loop over the encryption devices. This commit removes the function and calls replaceDatapath() from reinitializeIPSec() directly. There are no functional changes. Signed-off-by: Robin Gögge <r.goegge@isovalent.com> Signed-off-by: Timo Beckers <timo@isovalent.com>
[ upstream commit 0b9b390 ] Currently, we develop the datapath against multiple versions of LLVM: various local (host) toolchains during development, CI uses an LLVM version installed by a GH workflow, and the agent uses the cilium-builder container image. This PR changes the BPF unit tests to use cilium-builder by default using the `run_bpf_tests` make target in the root Makefile of the project. Small overview of the changes: - run bpf unit tests CI using the cilium-builder image so we use the same LLVM toolchain across all tests - set -j<numcpu> on the root Docker invocation to build .o's in parallel, as building the tests was becoming rather slow - moved `test/bpf_tests/` to `bpf/tests/bpftest` to keep the BPF test runner closer to the .c test files it's used with - removed the layer of indirection through `test/Makefile`; the root Makefile now calls `bpf/tests/Makefile` directly - added a `run` target to `bpf/tests/Makefile` to make it easier to invoke the tests using the host Go toolchain without rebuilding the world. sudo is now used automatically for 'go test' if `make` is invoked as a non-root user. - cleaned up output generated by bpf/tests/Makefile Signed-off-by: Timo Beckers <timo@isovalent.com>
[ upstream commit e2d90da ] The arguments to the replaceDatapath functions are already quite numerous and make the function signature hard to read. In preparation for future commits, this patch aggregates almost all arguments to the function into one option parameter. Signed-off-by: Robin Gögge <r.goegge@isovalent.com> Signed-off-by: Timo Beckers <timo@isovalent.com>
[ upstream commit f2d804b ] A follow-up commit will introduce attaching TC programs using tcx. Those attachments cannot be overridden using netlink. If an older version of Cilium wants to replace an TC program on a managed interface, it'll need to remove the tcx attachment first. This commit teaches the agent to remove leftover tcx link objects from previous installs, before reattaching it using netlink. Note that this transition is never seamless, since some time passes between deleting the link and attaching the new program using netlink. However, as explained in 7a8e3c8 ("loader: clean up XDP bpf_links created by newer Cilium versions"), this downgrade path should rarely happen. Signed-off-by: Robin Gögge <r.goegge@isovalent.com> Co-authored-by: Timo Beckers <timo@isovalent.com> Signed-off-by: Timo Beckers <timo@isovalent.com>
[ upstream commit 5c35dc3 ] Centralize the declaration so we can assume it's present in other Makefiles importing Makefile.defs. Signed-off-by: Timo Beckers <timo@isovalent.com>
[ upstream commit cd5bc4e ] This patch should make testdata play a bit nicer with backports, since including headers like node_config.h, ep_config.h and maps.h cause potential churn in the resulting BTF info. Include a minimal subset of headers and reduce testdata code to what's strictly necessary for the Go tests to run. Signed-off-by: Timo Beckers <timo@isovalent.com>
rgo3
force-pushed
the
pr/v1.15-backport-2024-03-28-02-32
branch
from
April 2, 2024 06:33
3c902fc
to
1b98201
Compare
rgo3
removed
the
dont-merge/needs-rebase
This PR needs to be rebased because it has merge conflicts.
label
Apr 2, 2024
rgo3
force-pushed
the
pr/v1.15-backport-2024-03-28-02-32
branch
from
April 2, 2024 10:51
1b98201
to
c8ebf0b
Compare
Signed-off-by: Cilium Imagebot <noreply@cilium.io>
/test-backport-1.15 |
aanm
approved these changes
Apr 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/1.15
This PR represents a backport for Cilium 1.15.x of a PR that was merged to main.
kind/backports
This PR provides functionality previously merged into master.
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.
Once this PR is merged, a GitHub action will update the labels of these PRs: