Commit Graph

5 Commits (239acac2c527828b312304810a9216bfba794496)

Author SHA1 Message Date
Thomas Eizinger 239acac2c5
workspace: include eBPF crates in default-members
Being able to compile the eBPF crates for the host architecture is
useful because it allows `cargo build` and `cargo test` to "just work".

To achieve that, we feature-gate `no_std` and `no_main` on the bpf
target architecture.
4 weeks ago
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