Commit Graph

59 Commits (5e13283f59b0c3b4cb47de1e31d8d0960e80b4cc)

Author SHA1 Message Date
dependabot[bot] dd92b41a59
build(deps): bump the cargo-crates group with 2 updates
Updates the requirements on [nix](https://github.com/nix-rust/nix) and [object](https://github.com/gimli-rs/object) to permit the latest version.

Updates `nix` to 0.28.0
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.28.0...v0.28.0)

Updates `object` to 0.35.0
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.35.0...0.35.0)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  dependency-group: cargo-crates
- dependency-name: object
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months ago
dependabot[bot] dc9ed22aeb
build(deps): update object requirement
Updates the requirements on [object](https://github.com/gimli-rs/object) to permit the latest version.

Updates `object` to 0.34.0
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.34.0...0.34.0)

---
updated-dependencies:
- dependency-name: object
  dependency-type: direct:production
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
5 months ago
dependabot[bot] 7f4c1d7892
build(deps): update rustdoc-json requirement
Updates the requirements on [rustdoc-json](https://github.com/Enselic/cargo-public-api) to permit the latest version.

Updates `rustdoc-json` to 0.8.9
- [Release notes](https://github.com/Enselic/cargo-public-api/releases)
- [Changelog](https://github.com/Enselic/cargo-public-api/blob/main/rustdoc-json/CHANGELOG.md)
- [Commits](https://github.com/Enselic/cargo-public-api/compare/rustdoc-json-v0.8.6...rustdoc-json-v0.8.9)

---
updated-dependencies:
- dependency-name: rustdoc-json
  dependency-type: direct:production
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
5 months ago
dependabot[bot] f019ca33ed
build(deps): bump the production-dependencies group with 1 update
Updates the requirements on [object](https://github.com/gimli-rs/object) to permit the latest version.

Updates `object` to 0.32.2
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.32.0...0.32.2)

---
updated-dependencies:
- dependency-name: object
  dependency-type: direct:production
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
6 months ago
Dave Tucker ea8073793e chore(aya-ebpf-macros): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 41c61560ea chore(aya-ebpf): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 70ac91dc1e chore(aya-ebpf-bindings): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 022aff96aa chore: Rename bpf dir to ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 13b1fc63ef chore: Don't use path deps in workspace
This moves the path dependencies back into the per-crate Cargo.toml.
It is required such that the release tooling can correctly calculate
which version constraints require changing when we perform a release.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
dependabot[bot] d71d5f72ff
build(deps): bump the production-dependencies group with 1 update
Updates the requirements on [nix](https://github.com/nix-rust/nix) to permit the latest version.

Updates `nix` to 0.27.1
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.27.0...v0.27.1)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
7 months ago
Dave Tucker b3e7ef741c chore: Use the cargo workspace package table
This allows for inheritance of common fields from the workspace root.
The following fields have been made common:

- authors
- license
- repository
- homepage
- edition

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Alessandro Decina a23772239a deps: update hashbrown
Hashbrown depends on ahash which used to use feature(stdsimd) which as
been removed in https://github.com/rust-lang/rust/issues/27731.

Latest hashbrown bumps ahash which doesn't use the removed feature
anymore.
8 months ago
dependabot[bot] b8743ac5f9
build(deps): bump the production-dependencies group with 2 updates
Updates the requirements on [env_logger](https://github.com/rust-cli/env_logger) and [which](https://github.com/harryfei/which-rs) to permit the latest version.

Updates `env_logger` to 0.10.2
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.10.0...v0.10.2)

Updates `which` to 5.0.0
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/5.0.0...5.0.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  dependency-group: production-dependencies
- dependency-name: which
  dependency-type: direct:production
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
8 months ago
dependabot[bot] b3ec33e763
build(deps): update public-api requirement from 0.32.0 to 0.33.1
Updates the requirements on [public-api](https://github.com/Enselic/cargo-public-api) to permit the latest version.
- [Release notes](https://github.com/Enselic/cargo-public-api/releases)
- [Changelog](https://github.com/Enselic/cargo-public-api/blob/main/rustdoc-json/CHANGELOG.md)
- [Commits](https://github.com/Enselic/cargo-public-api/compare/v0.32.0...v0.32.0)

---
updated-dependencies:
- dependency-name: public-api
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months ago
Alessandro Decina cc60ca77b9
Merge pull request #819 from Tuetuopay:test-afxdp
tests: add AF_XDP test using xdpilone
10 months ago
dependabot[bot] c1b367eb4a
build(deps): update bindgen requirement from 0.68 to 0.69
Updates the requirements on [bindgen](https://github.com/rust-lang/rust-bindgen) to permit the latest version.
- [Release notes](https://github.com/rust-lang/rust-bindgen/releases)
- [Changelog](https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/rust-bindgen/compare/v0.68.0...v0.68.1)

---
updated-dependencies:
- dependency-name: bindgen
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
11 months ago
Tuetuopay aa5ff517e7 tests: add AF_XDP test using xdpilone 11 months ago
dependabot[bot] 67fe16e723
Merge pull request #825 from aya-rs/dependabot/cargo/async-io-2.0 11 months ago
dependabot[bot] c89b2d156d
build(deps): update async-io requirement from 1.3 to 2.0
Updates the requirements on [async-io](https://github.com/smol-rs/async-io) to permit the latest version.
- [Release notes](https://github.com/smol-rs/async-io/releases)
- [Changelog](https://github.com/smol-rs/async-io/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/async-io/compare/v1.3.0...v1.13.0)

---
updated-dependencies:
- dependency-name: async-io
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
11 months ago
dependabot[bot] 3824b3d479
build(deps): update which requirement from 4.4.0 to 5.0.0
Updates the requirements on [which](https://github.com/harryfei/which-rs) to permit the latest version.
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/4.4.0...4.4.2)

---
updated-dependencies:
- dependency-name: which
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
11 months ago
Alessandro Decina d679a973ca integration-tests: enable logs
Use test_log::test so setting RUST_LOG=aya=debug works and it's easier
to debug failures.
11 months 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>
11 months ago
dependabot[bot] 9680f50c08
build(deps): update dialoguer requirement from 0.10 to 0.11
Updates the requirements on [dialoguer](https://github.com/console-rs/dialoguer) to permit the latest version.
- [Changelog](https://github.com/console-rs/dialoguer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/console-rs/dialoguer/compare/v0.10.0...v0.10.4)

---
updated-dependencies:
- dependency-name: dialoguer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
dependabot[bot] e0880316c3
build(deps): update cargo_metadata requirement from 0.17.0 to 0.18.0
Updates the requirements on [cargo_metadata](https://github.com/oli-obk/cargo_metadata) to permit the latest version.
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.17.0...0.17.0)

---
updated-dependencies:
- dependency-name: cargo_metadata
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
dependabot[bot] 9686092280
build(deps): update bindgen requirement from 0.66 to 0.68
Updates the requirements on [bindgen](https://github.com/rust-lang/rust-bindgen) to permit the latest version.
- [Release notes](https://github.com/rust-lang/rust-bindgen/releases)
- [Changelog](https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/rust-bindgen/compare/v0.66.0...v0.66.1)

---
updated-dependencies:
- dependency-name: bindgen
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
dependabot[bot] a38dc057b4
build(deps): update nix requirement from 0.26.2 to 0.27.0
Updates the requirements on [nix](https://github.com/nix-rust/nix) to permit the latest version.
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.26.2...v0.26.3)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
Tamir Duberstein f988e97b5f
Upgrade public-api
This fixes `cargo xtask public-api` by picking up
https://github.com/aDotInTheVoid/rustdoc-types/commit/577a774c2433beda6.
1 year ago
Tamir Duberstein abda239d63
aya: deny various allow-by-default lints
Notably:
- clippy::use_self: replaced many T with Self.
- single_use_lifetimes: removed some single use lifetimes.
- unreachable_pub: removed some unreachable pub items.
- unused_crate_dependencies: removed unused futures,parking_lot deps.
- unused_qualifications: found a potential `crate` vs `$crate` bug.
- let_underscore_drop: not enabled, seems to trigger false positives.
- missing_copy_implementations: not enabled, unclear if we want this.
- unsafe_op_in_unsafe_fn: not enabled, unclear if we want this.
- unused_results: not enabled, needs many fixes (but I think wanted).
1 year ago
dependabot[bot] 623cfd89bf
build(deps): update num_enum requirement from 0.6 to 0.7
Updates the requirements on [num_enum](https://github.com/illicitonion/num_enum) to permit the latest version.
- [Commits](https://github.com/illicitonion/num_enum/compare/0.6.0...0.6.1)

---
updated-dependencies:
- dependency-name: num_enum
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
dependabot[bot] d0838a7688
build(deps): update object requirement from 0.31 to 0.32
Updates the requirements on [object](https://github.com/gimli-rs/object) to permit the latest version.
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.31.0...0.31.1)

---
updated-dependencies:
- dependency-name: object
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
Tamir Duberstein 82a77bc83d
integration-test: Implement running on VMs
Implements running integration tests on multiple VMs with arbitrary
kernel images using `cargo xtask integration-test vm ...`.

This changes our coverage from 6.2 to 6.1 and 6.4.
1 year ago
Tamir Duberstein 3692e53ff0
Merge pull request #706 from aya-rs/reloc-tests
integration-test: Remove runtime toolchain deps
1 year ago
Tamir Duberstein dca5e6c167
integration-test: Remove runtime toolchain deps
Move the use of clang and llvm-objcopy from run-time to build-time. This
allows the integration tests to run on VMs with simpler userlands.

Create a new CI job to build the integration tests separately from
running them. Ship them from that job to the runner job using github
actions artifacts.
1 year ago
ajwerner afacfddd8b
Merge pull request #710 from ajwerner/move-rustversion-to-workspace
bpf: move rustversion build dep to workspace
1 year ago
Andrew Werner 9f0e83726f bpf: move rustversion build dep to workspace
All the other dependencies are at the workspace level other than this
one.
1 year ago
Dave Tucker c72aab5f7b aya-bpf-macros: Refactor for ease of testing
The aya-bpf-macros needed refactoring for:

1. Ease of testing
2. To be consistent with when we use K/V args vs. idents
3. To deprecate the use of `name` to change the exported name of a
   function - we now use the symbol table.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
1 year ago
Tuetuopay c74813f8c5 test: add the possibility to run a test inside a network namespace
For tests that do networking operations, this allows to have a
clean-state network namespace and interfaces for each test. Mainly, this
avoids "device or resource busy" errors when reusing the loopback
interface across tests.
1 year ago
Dave Tucker f833f1fc1d xtask: Add cargo-public-api
Adds cargo-public-api. This allows for public API changes to get caught
in CI, requiring new changes to be "blessed" by using:

  cargo xtask public-api --bless

When this file is changed for aya, Alessandro will need to review the PR.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
1 year ago
dependabot[bot] 4b6579e2f1
build(deps): update cargo_metadata requirement from 0.15.4 to 0.17.0
Updates the requirements on [cargo_metadata](https://github.com/oli-obk/cargo_metadata) to permit the latest version.
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.15.4...0.15.4)

---
updated-dependencies:
- dependency-name: cargo_metadata
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
Tamir Duberstein 8cec4b25f9
Revert "integration-test: add to default-members"
This reverts commit 025c76780c.

Fixes #678.
1 year ago
Mike Rostecki 96fa08bd82 cargo: Define dependencies on the workspace level
This way we will avoid version mismatches and make differences in
features across our crates clearer.
1 year ago
Tamir Duberstein 025c76780c
integration-test: add to default-members
This works now that build.rs does the right thing.

Update the `miri test` command in the lint job so it has the proper
exclusions; it is now in line with the invocations in the build-test job.
1 year ago
Tamir Duberstein b875f83f22
Remove duplicate entry 1 year ago
Tamir Duberstein 6d06e2bf3a
Include ~all crates in default members
Several tests were not running due to being omitted from this list.
1 year ago
Tamir Duberstein e08c6471dd
Cargo.toml: suppress resolver warning on nightly
```
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
```
1 year 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.
1 year ago
Michal Rostecki ed9c2a1780 integration-tests: Build eBPF programs always with release profile
Also, add the `codegen-unit` option to the profile.
1 year ago
Shenghui Ye 81bc307dce aya-obj: migrate bindgen destination
Aya::obj depends on bindgen generated files, and we start
by migrating bindgen generated files.

This commit adds the new aya-obj crate to the workplace
and migrates generated files into the crate. We use core
instead of std in an effort to make the final crate no_std.

Bindgen was run against libbpf v1.0.1.

Refs: #473
2 years ago
Alessandro Decina 832bdd280c {{crate_name}}: release version 0.1.13 2 years ago
Dave Tucker aaa20cc1fd aya-gen: Rename to aya-tool
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago