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

Use libbpf instead of iproute2 to load eBPF programs #2407

Open
fruffy opened this issue Jun 1, 2020 · 2 comments
Open

Use libbpf instead of iproute2 to load eBPF programs #2407

fruffy opened this issue Jun 1, 2020 · 2 comments
Assignees
Labels
ebpf Topics related to the eBPF back end enhancement This topic discusses an improvement to existing compiler code.

Comments

@fruffy
Copy link
Collaborator

fruffy commented Jun 1, 2020

The dependency on iproute2 and tc causes some issues when loading eBPF programs. Different versions of Ubuntu package different versions of iproute2, which offers different levels of support for eBPF. In addition, there seems to be some problems trying to load more advanced map types such as LPM_TRIE maps.

libbpf offers an API to load and manage eBPF programs. It might make sense to write a small loader that takes care of attaching an eBPF program to an interface.

@mihaibudiu mihaibudiu added the enhancement This topic discusses an improvement to existing compiler code. label Jun 1, 2020
@jafingerhut
Copy link
Contributor

I do not know the intricacies involved here, but depending upon what the major EBPF users want, you could consider limiting 'official', i.e. checked-into-repository, support to only long term Ubuntu releases, and even carefully delimit a subset of those.

For example, one could consider no longer supporting Ubuntu 16.04 effective immediately, or "soon", for this purpose, although that would require updating other things which are currently tested on Travis on Ubuntu 16.04 images, I believe.

@fruffy
Copy link
Collaborator Author

fruffy commented Jun 3, 2020

That could also be an option, I think for sanity's sake, Ubuntu 16.04 needs to be eventually deprecated to keep up with all the eBPF/XDP changes. Another reason to get rid of iproute2 is simply the lack of flexibility. There are data structures such as the bpf_elf_map I have to maintain just for loading with tc.

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

No branches or pull requests

3 participants