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: Default to KERNEL=netnext #17600

Merged
merged 1 commit into from Oct 19, 2021

Conversation

pchaigno
Copy link
Member

The Makefile in bpf/ is used to compile-test our BPF programs but also to compile the kernel-specific object files we use for complexity tests. It takes a KERNEL environment variable to generate BPF programs with the appropriate features enabled. That is, it tries to maximize the program size for each kernel. KERNEL currently defaults to v4.9.

On bpf-next, Cilium's BPF programs are sometimes used to validate verifier patches, to measure the performance impact or verify
correctness. Since Cilium has some of the largest open source BPF programs, this is a quick way to avoid regressions.

Folks using our Makefile for that purpose are unlikely to know about the KERNEL environment variable and will use its default value. To reduce the likelihood of regressions, we can switch the default KERNEL value to netnext. That will generate BPF programs with all possible options on the latest kernels, which more closely match what bpf-next folks are looking for when testing their patches.

@pchaigno pchaigno added area/CI Continuous Integration testing issue or flake 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 Oct 13, 2021
@pchaigno pchaigno marked this pull request as ready for review October 13, 2021 20:00
@pchaigno pchaigno requested review from a team as code owners October 13, 2021 20:00
@pchaigno pchaigno requested review from glibsm and ti-mo October 13, 2021 20:00
Copy link
Contributor

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

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

Cool, didn't know! I usually test ebpf-go by loading objects built by this Makefile.

The Makefile in bpf/ is used to compile-test our BPF programs but also
to compile the kernel-specific object files we use for complexity tests.
It takes a KERNEL environment variable to generate BPF programs with the
appropriate features enabled. That is, it tries to maximize the program
size for each kernel. KERNEL currently defaults to v4.9.

On bpf-next, Cilium's BPF programs are sometimes used to validate
verifier patches, to measure the performance impact or verify
correctness. Since Cilium has some of the largest open source BPF
programs, this is a quick way to avoid regressions.

Folks using our Makefile for that purpose are unlikely to know about the
KERNEL environment variable and will use its default value. To reduce
the likelyhood of regressions, we can switch the default KERNEL value to
netnext. That will generate BPF programs with all possible options on
the latest kernels, which more closely match what bpf-next folks are
looking for when testing their patches.

Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno pchaigno force-pushed the bpf-make-defaults-netnext-kernel branch from 5e356d1 to a0d8a7e Compare October 14, 2021 14:24
@pchaigno
Copy link
Member Author

As per #17601, I think we can skip the review request on cilium/build here. Marking ready to merge.

@pchaigno pchaigno added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 19, 2021
@joamaki joamaki merged commit 1cad0c5 into cilium:master Oct 19, 2021
@pchaigno pchaigno deleted the bpf-make-defaults-netnext-kernel branch October 19, 2021 08:55
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 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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants