Re:PythonBPF – Writing eBPF Programs in Pure Python
by indigo945 on Monday September 15, 2025 @04:45AM
(#45247499)
The "How it works under the hood" section raises more question than it answers. What is the difference between step 3 and step 4? As described, step 3 goes from LLVM IR to BPF (via llc), and step 4 - goes from LLVM IR to eBPF bytecode? That's nonsensical.
[ Parent
| on HN ]
Re:PythonBPF – Writing eBPF Programs in Pure Python
by varunrmallya on Monday September 15, 2025 @10:54AM
(#45250437)
I'm the co-author.The code is in a very very bad state right now, but the architecture is pretty ok to explain. In step 3, we translate from the Python frontend to the LLVM IR. In step 4 we compile it down to an object file using the LLVM backend `llc`. This object file gets loaded into the kernel and it is what actually contains the eBPF bytecode.