Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is super useful! I've been hacking recently on qdisc classifiers, and trying to set a filter up with BPF, but there's a paucity of documentation on the subject. The tc tools are sorta documented here (https://man7.org/linux/man-pages/man8/tc-bpf.8.html), but it's quite hard to find docs on the underlying syscalls and the behavior of `bpf_prog_type_sched_cls`.

I bought a copy of BPF performance tools to learn more about the BPF interface, and it's really useful but quite focused on performance! I wish there was a resource of similar depth and breath about eBPF for classification/XDP.



Thanks for getting the BPF book. Further references for BPF bits would be the kernel docs (Documentation/bpf), kernel source (kernel/bpf, include/.../bpf), the self tests (tools/testing/selftests/bpf), Cilium's docs (https://docs.cilium.io/en/stable/bpf/), and if all else fails, mailing lists like iovisor-dev.

It sounds like there should be a deep book on BPF internals (written by maintainers Alexei & Daniel), but it would be a tough sell: you really do need the maintainers to author it or be heavily involved to do it well, and it's a lot of work for a changing target, and without a large audience (lots of people will use BPF, but few will code it at that level. I'd guess 100 world-wide. Not a great case for a book!) Compare it to my BPF perf tools book: big audience (end users: developers, SREs, perf engineers, etc), and has a long shelf life (the tools are done, and work, and should keep working).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: