16:00
-
16:30
-
16:30
Day 1
Using eBPF within your Python program using EBPFCat
<p>eBPF is a powerful technology, but it is often hard to use, because its
toolchain is non-trivial. In my talk I present
<a href="https://github.com/tecki/ebpfcat">EBPFCat</a>, a pure Python library that can
generate eBPF directly without any dependency on other code beyond the Linux
kernel. Unlike most eBPF implementations, no compiler is involved. Instead, the
user writes Python code which generates eBPF on-the-fly at runtime.</p>
<p>In EBPFCat, user- and kernel space are tightly integrated, so
that both eBPF and Python code can access the same data structures. This way,
one can use eBPF to write the performance critical parts of a program, while
retaining the versatility of Python for the bulk of the code. This opens eBPF
to a large audience who are interested in the performance boost by eBPF, but
are hesitant to learn an entirely new tool set for it.</p>
<p>I will go through a simple example to show that using EBPFCat it is possible to
fit an entire eBPF program including its user space counterpart on a single
presentation slide. For this example I also show how EBPFCat generates the eBPF
bytecode.</p>
<p>While EBPFCat can be employed for usual eBPF use cases, I present one well
beyond typical systems-level applications: motion control. EtherCAT is a
standard field bus protocol based on EtherNet. Using eBPF we can reduce the
latency of communication with EtherCAT devices, allowing for real-time
performance. I will show a real-world combined motion system for physics
research that routinely uses EBPFCat.</p>
<p>Developers new to eBPF will get a jump start into everything needed for their
first project, while experienced kernel developers will be surprised just how
far eBPF can take you beyond system programming.</p>
<p>Links:
<a href="https://github.com/tecki/ebpfcat">EBPFCat on github</a>
<a href="https://ebpfcat.readthedocs.io/en/latest/">EBPFCat on readthedocs</a></p>