Skip to content

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 area/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 a review from kkourt September 10, 2021 14:29
@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
@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.

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 area/loader Impacts the loading of BPF programs into the kernel. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants