Commit Graph

4 Commits (5757a96353059860c3c55728a3e4b431b3daf142)

Author SHA1 Message Date
Thomas Eizinger 5757a96353
aya-ebpf: introduce `panic_handler` macro
All eBPF crates need to define a panic-handler.
To deduplicate that code, we introduce a macro for it.
4 weeks ago
Tamir Duberstein e0c4948e36 Extract integration-common for shared types 5 months ago
Dave Tucker 41c61560ea chore(aya-ebpf): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
1 year ago
Andrew Werner e2cf734490 aya: Implement RingBuf
This implements the userspace binding for RingBuf.

Instead of streaming the samples as heap buffers, the process_ring
function takes a callback to which we pass the event's byte region,
roughly following [libbpf]'s API design. This avoids a copy and allows
marking the consumer pointer in a timely manner.

[libbpf]: https://github.com/libbpf/libbpf/blob/master/src/ringbuf.c

Additionally, integration tests are added to demonstrate the usage
of the new APIs and to ensure that they work end-to-end.

Co-authored-by: William Findlay <william@williamfindlay.com>
Co-authored-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
2 years ago