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/Makefile: Enable setting complexity options #17364

Merged
merged 1 commit into from Sep 13, 2021

Conversation

pchaigno
Copy link
Member

In bpf/Makefile, we use environment variables MAX_XXX_OPTIONS to define the options to use when trying to maximize the program sizes for complexity tests. This commit simply makes it possible to override these variables from the command line, to generate different programs for complexity tests. For example, one can run:

$ MAX_HOST_OPTIONS="-DENABLE_IPV4 -DENABLE_IPV6" make -C bpf bpf_host.o

@kkourt I think that's all that is needed to address the first point of both of our TODO lists in #5058:

Change bpf/Makefile to be able to compile a single bpf_xxx target at a time while passing MAX_XXX_OPTIONS as an environment variable.

In bpf/Makefile, we use environment variables MAX_XXX_OPTIONS to define
the options to use when trying to maximize the program sizes for
complexity tests. This commit simply makes it possible to override these
variables from the command line, to generate different programs for
complexity tests. For example, one can run:

    $ MAX_HOST_OPTIONS="-DENABLE_IPV4 -DENABLE_IPV6" make -C bpf bpf_host.o

Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno pchaigno added sig/loader Impacts the loading of BPF programs into the kernel. area/CI Continuous Integration testing issue or flake release-note/ci This PR makes changes to the CI. kind/complexity-issue Relates to BPF complexity or program size issues labels Sep 10, 2021
@pchaigno pchaigno requested review from a team as code owners September 10, 2021 14:29
@pchaigno pchaigno added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 13, 2021
@pchaigno
Copy link
Member Author

The BPF compilation test is passing and the pull request received a review covering the only team review request. Marking ready to merge.

@kaworu kaworu merged commit 225069a into cilium:master Sep 13, 2021
@pchaigno pchaigno deleted the bpf-makefile-pass-max-config branch September 13, 2021 19:37
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.9.11 Oct 14, 2021
@pchaigno
Copy link
Member Author

Marking this pull request for backport into v1.9 and v1.10 given we'll also backport the extension of K8sVerifier (cf. #17470) which relies on this change.

@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.9 in 1.9.11 Oct 18, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.9 to Backport done to v1.9 in 1.9.11 Oct 18, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.9 to Backport done to v1.9 in 1.9.11 Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake kind/complexity-issue Relates to BPF complexity or program size issues ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI. sig/loader Impacts the loading of BPF programs into the kernel.
Projects
No open projects
1.9.11
Backport done to v1.9
Development

Successfully merging this pull request may close these issues.

None yet

5 participants