Skip to content

How are bpf_bpf{eb,el}.o files generated? #876

Answered by ti-mo
hiqsociety asked this question in Q&A
Discussion options

You must be logged in to vote

The following go:generate statement invokes bpf2go when running go generate in the examples/xdp directory.

//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -cc $BPF_CLANG -cflags $BPF_CFLAGS bpf xdp.c -- -I../headers

This results in bpf_bpf*.(g)o files in the directory.

Regarding libbpf_num_possible_cpus(), please open another discussion with a bit more context about what you're trying to do.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@hiqsociety
Comment options

@ti-mo
Comment options

@lmb
Comment options

Answer selected by ti-mo
Comment options

You must be logged in to vote
1 reply
@lmb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants