Commit Graph

7 Commits (e72a32cb0e3496a5f5dab12de2759b37e67e2a83)

Author SHA1 Message Date
Andrew Werner e72a32cb0e 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
Tamir Duberstein cc2bc0acc1
Remove procfs dependency 2 years ago
Tamir Duberstein b8252f46d9
Skip BPF_F_XDP_HAS_FRAGS tests on unsupported kernels 2 years ago
Tamir Duberstein 91a415f095
Skip relocation tests on unsupported kernels 2 years ago
Tamir Duberstein b0a4ab5f20
xtask: Standardize command logging
Don't run `cargo build --verbose`; it's too noisy.
2 years ago
Tamir Duberstein b611038d5b
Use procfs crate for kernel version parsing
This allows the logic to be shared between aya and the integration tests
without exposing additional public API surface.
2 years ago
Tamir Duberstein 9ca0af1a79
integration-test: Remove integration-test-macros
This doesn't add any value; use `cargo build --tests` with
`--message-format=json` instead; parse the output using `cargo_metadata`
to discover the location of the test binary.

Move test/integration-test/src/tests -> test/integration-test/tests to
conform to
https://doc.rust-lang.org/book/ch11-03-test-organization.html#integration-tests.
2 years ago