23 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
v0.2.0 (2024-02-28)
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.
-
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
Documentation
- Add CHANGELOG
New Features
- check format and value type in proc macro
Bug Fixes
- remove some useless code
Other
-
group_imports = "StdExternalCrate" High time we stop debating this; let the robots do the work.
-
s/Result<usize, ()>/Option/
Option<NonZeroUsize>
is guaranteed to have the same size asusize
, which is not guarnateed forResult
. This is a minor optimization, but also results in simpler code. -
Define dependencies on the workspace level This way we will avoid version mismatches and make differences in features across our crates clearer.
-
add formatter and check in CI
-
Unify IP format hints into one, repsesent it by
:i
token Having separate format hints and tokens per IP address family is unnecessary, since they are represented by different types and we handle format hints for each type separately. So we can just have one format hint.Also, we should be consistent with the format strings grammar in Rust[0]. The
type
token, which is mapped to formatting traits, usually consists of one letter[1] (and optional?
forDebug
trait, but that doesn't matter for us). It shouldn't consist of multiple letters. Our:ipv4
and:ipv6
tokens were clearly breaking that convention, so we should rather switch to something with one letter - hence:i
.[0] https://doc.rust-lang.org/std/fmt/#syntax [1] https://doc.rust-lang.org/std/fmt/#formatting-traits
-
support logging byte slices These only support LowerHex and UpperHex hints for now.
-
check errors in tests
-
Move the
Pod
implementations from aya-log-common to aya-log Keeping thePod
implementations and optional dependency on aya in aya-log-common breaks the clippy checks (which are made on the entire workspace).The reason is that when different crates inside the workspace have the same dependency with different features, that dependency is built only once with the sum of features needed by all crates. It's not being built separately with different feature sets.
That's why, before this change, aya-log-common was built once for the entire workspace with
userspace
feature enabled. That made importing aya-log-ebpf inside integration-ebpf impossible. The aya-log-common build, withuserspace
feature enabled, was pulling std as a dependency. Therefore, importing aya-log-ebpf inside integration-ebpf resulted in including std and errors like:error[E0152]: found duplicate lang item `panic_impl` --> test/integration-ebpf/src/log.rs:23:1 | 23 | fn panic(_info: &core::panic::PanicInfo) -> ! { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: the lang item is first defined in crate `std` (which `aya` depends on)
This change fixes the problem by removing the
userspace
feature from aya-log-common and moving thePod
implementations to aya-log. -
update env_logger requirement from 0.9 to 0.10 Updates the requirements on env_logger to permit the latest version.
updated-dependencies:
- dependency-name: env_logger dependency-type: direct:production ...
Commit Statistics
- 37 commits contributed to the release over the course of 469 calendar days.
- 469 days passed between releases.
- 14 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Add CHANGELOG (
9abb716
) - Release aya-log-common v0.1.14, aya-log v0.2.0 (
c22a696
) - Release aya-obj v0.1.0, aya v0.12.0, safety bump aya-log v0.2.0 (
0e99fa0
) - Don't use path deps in workspace (
13b1fc6
) - Merge pull request #882 from dave-tucker/metadata (
0fadd69
) - Use the cargo workspace package table (
b3e7ef7
) - Appease rustc dead_code lint (
963dd13
) - Merge pull request #797 from aya-rs/rustfmt-group-imports (
373fb7b
) - Group_imports = "StdExternalCrate" (
d16e607
) - Merge pull request #736 from aya-rs/logging-better (
45df251
) - Merge pull request #735 from aya-rs/log-option-not-result (
ecf0dd9
) - S/Result<usize, ()>/Option/ (
ca3f70b
) - Remove pointless DefaultLogger (
00d265c
) - Merge pull request #667 from vadorovsky/workspace-dependencies (
f554d42
) - Define dependencies on the workspace level (
96fa08b
) - Merge pull request #666 from aya-rs/toml-fmt (
dc3b0b8
) - Add formatter and check in CI (
c8bf646
) - Merge pull request #650 from aya-rs/test-cleanup (
61608e6
) - Remove "async" feature (
fa91fb4
) - Unify IP format hints into one, repsesent it by
:i
token (84e5e28
) - Remove some useless code (
d999a95
) - Check format and value type in proc macro (
0970300
) - Merge pull request #585 from probulate/tag-len-value (
5165bf2
) - Support logging byte slices (
d9f966e
) - Aya-log, aya-log-common: economize bytes (
a4a69a6
) - Check errors in tests (
e4537e3
) - Aya-log, aya-log-common: Remove duplicate struct (
490d7d5
) - Merge pull request #591 from vadorovsky/aya-log-impl-pod (
3d3ce8b
) - Move the
Pod
implementations from aya-log-common to aya-log (5603d72
) - Merge pull request #484 from vadorovsky/update-tokio (
bea0e83
) - Update Tokio and inventory (
dad75f4
) - Don't panic in init when bpf programs don't log (
12927cf
) - Merge pull request #456 from dmitris/uninlined_format_args (
16b029e
) - Fix uninlined_format_args clippy issues (
055d94f
) - Merge pull request #449 from aya-rs/dependabot/cargo/env_logger-0.10 (
f9bef9f
) - Update env_logger requirement from 0.9 to 0.10 (
1c8088b
) - Revert "aya-log, aya-log-common: temporarily revert to old map API so we can release" (
0b41018
)
- Add CHANGELOG (
v0.1.13 (2022-11-16)
Other
-
release version 0.1.13
-
Add format hints for MAC addresses Add
{:mac}
(for lower-case hex representation) and{:MAC}
(for upper-case hex representation) format hints for the[u8; 6]
type, which is the standard one in Linux to store physical addresses in.Tested with: https://github.com/vadorovsky/aya-examples/tree/main/xdp-mac
-
Make miri happy Miri took issue about using slice::from_raw_parts without checking for alignment. Instead, we can simply convert to a [u8;16] into a [u16;8] by iterating in chunks of 2 and bitshifting (remembering that these arrays are in network-endian order).
-
Add display hints This change adds optional display hints:
{:x}
,{:X}
- for hex representation of numbers{:ipv4}
,{:IPv4}
- for IPv4 addresses{:ipv6}
,{:IPv6}
- for IPv6 addresses
It also gets rid of dyn-fmt and instead comes with our own parser implementation.
Tested on: https://github.com/vadorovsky/aya-examples/tree/main/tc
-
Fix links to aya-log repo The aya-log repo ([0]) has been archived, use the link to aya repo instead.
-
Remove i128 and u128 types They are not supported by eBPF VM and we are going to use arrays for IPv6.
-
use new PerCpuArray::get_ptr_mut API
-
Add example This ensures that macro expansion works properly and that expanded code compiles
-
Ensure the bounds of log buffer eBPF verifier rejects programs which are not checking the bounds of the log buffer before writing any arguments. This change ensures that written log arguments.
In practice, it means that doing this kind of checks is not going to be needed in eBPF program code anymore:
-
Bump the buffer size 1024 is too small for many kernel string limits (i.e. PATH_MAX, which is 4096).
-
do not release
-
use stricter version for the aya-log-common dep
-
inline write_record_header This seems to help the verifier keep track of where we're writing into LOG_BUF
-
initialize AYA_LOGS with max_entries=0 This way aya will create one perf buffer for each cpu
Commit Statistics
- 59 commits contributed to the release over the course of 110 calendar days.
- 14 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Release version 0.1.13 (
832bdd2
) - Aya-log, aya-log-common: temporarily revert to old map API so we can release (
0d040d2
) - Merge pull request #436 from vadorovsky/aya-log-mac-addr (
3adb9b0
) - Add format hints for MAC addresses (
2223ab8
) - Merge pull request #397 from astoycos/refactor-map-api2 (
d6cb1a1
) - Make map APIs return an option (
f3262e8
) - Core refactor of Map API (
1aefa2e
) - Merge pull request #390 from dave-tucker/clippy-up (
367ab20
) - Make miri happy (
b2924a3
) - Aya-log, aya-log-common: start next development iteration 0.1.12-dev.0 (
6f0637a
) - Aya-log, aya-log-common: release version 0.1.11 (
ba927ac
) - Add display hints (
83ec27f
) - Change from Rust edition 2018 to 2021 (
944d6b8
) - Merge pull request #361 from chenhengqi/fix-aya-log-links (
632ea30
) - Fix links to aya-log repo (
b8b291c
) - Merge pull request #357 from vadorovsky/env_logger (
3d5ab0b
) - Aya-log, test: Switch from simplelog to env_logger (
3664e1e
) - Merge pull request #353 from vadorovsky/log-remove-u128 (
d968094
) - Remove i128 and u128 types (
611f967
) - Merge pull request #350 from dave-tucker/monorepo (
f37a514
) - Re-organize into a single workspace (
dc31e11
) - Fix the log buffer bounds (
28abaec
) - Ensure log buffer bounds (
2e07028
) - Use new PerCpuArray::get_ptr_mut API (
6aea880
) - Aya-log, aya-log-common: start next development iteration 0.1.11-dev.0 (
526493b
) - Aya-log, aya-log-common: release version 0.1.10 (
3abd973
) - Update aya requirement from 0.10.7 to 0.11.0 (
060ba45
) - Add CI (
0038b43
) - Add vim/vscode rust-analyzer settings (
c1bb790
) - Add rustfmt.toml (
3f00851
) - Add example (
5789585
) - Add Tests (
5d82d9a
) - Ensure the bounds of log buffer (
628b473
) - Bump the buffer size (
70b4e68
) - Aya-log, aya-log-common: start next development iteration 0.1.10-dev.0 (
bd9a5c8
) - Aya-log, aya-log-common: release version 0.1.9 (
8bc1bbb
) - Add cargo-release config (
a8d133f
) - Do not release (
d1a0ce5
) - Use stricter version for the aya-log-common dep (
c4d89fa
) - Inline write_record_header (
bdb2750
) - Update aya to 0.10.7 (
81befa0
) - Format arguments in userspace (
ca1fe7e
) - Don't recompute the record length (
9b229d0
) - Initialize AYA_LOGS with max_entries=0 (
7f8d705
) - Fix clippy warning (
2800454
) - Add copy of README.md inside aya-log/ (
8bde15d
) - Add missing manifest fields (
5e18a71
) - (cargo-release) version 0.1.1 (
31e71f8
) - (cargo-release) version 0.1.1 (
29955b2
) - Git add .cargo and xtask (
6d14a16
) - Update to aya 0.10.5 (
cced3da
) - Simplify BpfLogger::init (
9ab9c80
) - Minor tweaks to make the verifier's job easier (
2ac4334
) - Switch to aya-ufmt (
b14d4ba
) - Use aya_bpf::maps::PerfEventByteArray to output logs (
22d8f86
) - Use aya_log_ebpf::ufmt instead of ::ufmt (
741957f
) - Add ufmt to readme (
0d7ac3e
) - Update readme (
5df853c
) - Initial commit (
b29a061
)
- Release version 0.1.13 (