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

chore(pkg/bpf): Replace libbpfgo with cilium/ebpf #1438

Merged
merged 1 commit into from
Jul 9, 2024

Commits on Jul 8, 2024

  1. chore(pkg/bpf): Replace libbpfgo with cilium/ebpf

    cilium/ebpf is a pure Go eBPF package and is used in a number of popular
    cloud-native projects. The benefits to Kepler are:
    
    1. Bytecode is built using bpf2go and the C and Go structs are kept in
       sync automatically
    2. There is no requirement for Cgo anymore and therefore no requirement
       to have libbpf or libelf installed to compile and/or to be
       dynamically linked at runtime
    3. Simplified packaging as the correct bytecode is contained within the
       kepler binary
    
    Overall I'm happy with this change, but there is only one thing that
    bugs me.
    
    We have to check in the bytecode object files (e.g kepler.bpfel.o) or
    the Go tooling (go lint/go vet) complains about the missing files.
    I couldn't reliably get `go generate ./...` to work to compile these
    files in CI. This is something which should be relatively easy to fix
    in the Makefile/CI environment before we cut a release.
    
    Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
    dave-tucker committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    b582e2c View commit details
    Browse the repository at this point in the history