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

ebpf_common.h should not include linux/bpf.h #1961

Closed
mihaibudiu opened this issue Jun 6, 2019 · 2 comments · Fixed by #2403
Closed

ebpf_common.h should not include linux/bpf.h #1961

mihaibudiu opened this issue Jun 6, 2019 · 2 comments · Fixed by #2403
Labels
ebpf Topics related to the eBPF back end enhancement This topic discusses an improvement to existing compiler code.

Comments

@mihaibudiu
Copy link
Contributor

We do not need to depend on any kernel headers when doing user-level testing.

@mihaibudiu mihaibudiu added the enhancement This topic discusses an improvement to existing compiler code. label Jun 6, 2019
@mihaibudiu
Copy link
Contributor Author

@fruffy: this may be easy to do

@fruffy
Copy link
Collaborator

fruffy commented Jun 9, 2019

Yeah it is a quick fix, but I have to copy some data structures from the bpf file. Primarily these:

/* flags for BPF_MAP_UPDATE_ELEM command, copied from "linux/bpf" */
#define BPF_ANY     0 /* create new element or update existing */
#define BPF_NOEXIST 1 /* create new element if it didn't exist */
#define BPF_EXIST   2 /* update existing element */
#define BPF_F_LOCK  4 /* spin_lock-ed map_lookup/map_update */

/* Support bpf map types */
enum bpf_map_type {
    BPF_MAP_TYPE_HASH,
    BPF_MAP_TYPE_ARRAY,

I am currently working on a branch which restructures the ebpf backend a bit. I will include that change.

@jafingerhut jafingerhut added the ebpf Topics related to the eBPF back end label Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ebpf Topics related to the eBPF back end enhancement This topic discusses an improvement to existing compiler code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants