[opensuse-factory] Introducing BPF Compiler Collection (BCC)
Hi, I would like to introduce a new package to factory: BPF Compiler Collection (BCC). It's a python/c library (mostly for python, actually) to make it easier to load and attach eBPF programs to kprobe/uprobe events or sockets. Without bcc, the user has to write the Makefile and feed the kernel header paths to clang to compile the eBPF C code into a BPF object file, while it can be done with python-bcc in one line: bpf = BPF(src_file="bpf.c") So it's very convenient for kernel tracing and packet filtering. In fact, there is already a rich set of tracing tools in the package. See: https://github.com/iovisor/bcc#tools It could be useful tool for the developers. Besides, the support of the P4 language is under development. In the future, it could compile the P4 programs from the SDN controller to the switch into BPF programs for the linux kernel, and this would make bcc a nice tool for the network administrators. The package is already available in my branch: obs://home:gary_lin:iovisor/bcc The following rpm packages are created: libbcc0 python-bcc bcc-devel bcc-tools bcc-examples bcc-tools and bcc-examples would require some extra python packages such as python-future and python-pyroute2. Those two packages are already in obs://devel:language:python. Currently, there are some known issues: 1. Bcc is not working in Tumbleweed. This is actually a LLVM/Clang bug. GCC5 introduced the new C++11 ABI tags, and clang still doesn't support those tags. Since bcc utilizes LLVM/Clang to compile the BPF programs, it suffers the same issue. The LLVM bug: https://llvm.org/bugs/show_bug.cgi?id=23529 2. Some scripts in bcc-tools/bcc-examples are not working in Leap 42.1. It's because those scripts use the newer eBPF kernel APIs. Since eBPF is still evolving, the new APIs keep coming. Upgrading kernel from Kernel:stable shall work. I incline to submit bcc to Base:System. Any suggestion? Thanks, Gary Lin -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On mercredi, 24 février 2016 12.55:07 h CET Gary Lin wrote:
Hi,
I would like to introduce a new package to factory: BPF Compiler Collection (BCC). It's a python/c library (mostly for python, actually) to make it easier to load and attach eBPF programs to kprobe/uprobe events or sockets. Without bcc, the user has to write the Makefile and feed the kernel header paths to clang to compile the eBPF C code into a BPF object file, while it can be done with python-bcc in one line:
bpf = BPF(src_file="bpf.c")
So it's very convenient for kernel tracing and packet filtering. In fact, there is already a rich set of tracing tools in the package. See: https://github.com/iovisor/bcc#tools
It could be useful tool for the developers. Besides, the support of the P4 language is under development. In the future, it could compile the P4 programs from the SDN controller to the switch into BPF programs for the linux kernel, and this would make bcc a nice tool for the network administrators.
The package is already available in my branch: obs://home:gary_lin:iovisor/bcc
The following rpm packages are created:
libbcc0 python-bcc bcc-devel bcc-tools bcc-examples
bcc-tools and bcc-examples would require some extra python packages such as python-future and python-pyroute2. Those two packages are already in obs://devel:language:python.
Currently, there are some known issues: 1. Bcc is not working in Tumbleweed. This is actually a LLVM/Clang bug. GCC5 introduced the new C++11 ABI tags, and clang still doesn't support those tags. Since bcc utilizes LLVM/Clang to compile the BPF programs, it suffers the same issue. The LLVM bug: https://llvm.org/bugs/show_bug.cgi?id=23529
2. Some scripts in bcc-tools/bcc-examples are not working in Leap 42.1. It's because those scripts use the newer eBPF kernel APIs. Since eBPF is still evolving, the new APIs keep coming. Upgrading kernel from Kernel:stable shall work.
I incline to submit bcc to Base:System. Any suggestion?
Thanks,
Gary Lin
Have also a python3 version of python-bcc :-) -- Bruno Friedmann Ioda-Net Sàrl www.ioda-net.ch openSUSE Member, fsfe fellowship GPG KEY : D5C9B751C4653227 irc: tigerfoot -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed, Feb 24, 2016 at 02:29:16PM +0100, Bruno Friedmann wrote:
On mercredi, 24 février 2016 12.55:07 h CET Gary Lin wrote:
Hi,
I would like to introduce a new package to factory: BPF Compiler Collection (BCC). It's a python/c library (mostly for python, actually) to make it easier to load and attach eBPF programs to kprobe/uprobe events or sockets. Without bcc, the user has to write the Makefile and feed the kernel header paths to clang to compile the eBPF C code into a BPF object file, while it can be done with python-bcc in one line: [snip]
The following rpm packages are created:
libbcc0 python-bcc bcc-devel bcc-tools bcc-examples
Have also a python3 version of python-bcc :-)
Ah, right. I should add python3-bcc. Thanks! Gary Lin -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (2)
-
Bruno Friedmann
-
Gary Lin