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.
Use the cargo workspace package table This allows for inheritance of common fields from the workspace root. The following fields have been made common:
Option<NonZeroUsize>
is guaranteed to have the same size as usize
,
which is not guarnateed for Result
. This is a minor optimization, but
also results in simpler code.
: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 letter1. 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
Pod
implementations from aya-log-common to aya-log
Keeping the Pod
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, with userspace
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 the Pod
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:
9abb716
`](https://github.com/aya-rs/aya/commit/9abb7160e5
)) - Release aya-log-common v0.1.14, aya-log v0.2.0 ([`c22a696
`](https://github.com/aya-rs/aya/commit/c22a6963d4
)) - Release aya-obj v0.1.0, aya v0.12.0, safety bump aya-log v0.2.0 ([`0e99fa0
`](https://github.com/aya-rs/aya/commit/0e99fa0f34
)) - Don't use path deps in workspace ([`13b1fc6
`](https://github.com/aya-rs/aya/commit/13b1fc63ef
)) - Merge pull request #882 from dave-tucker/metadata ([`0fadd69
`](https://github.com/aya-rs/aya/commit/0fadd69537
)) - Use the cargo workspace package table ([`b3e7ef7
`](https://github.com/aya-rs/aya/commit/b3e7ef741c
)) - Appease rustc dead_code lint ([`963dd13
`](https://github.com/aya-rs/aya/commit/963dd13219
)) - Merge pull request #797 from aya-rs/rustfmt-group-imports ([`373fb7b
`](https://github.com/aya-rs/aya/commit/373fb7bf06
)) - Group_imports = "StdExternalCrate" ([`d16e607
`](https://github.com/aya-rs/aya/commit/d16e607fd4
)) - Merge pull request #736 from aya-rs/logging-better ([`45df251
`](https://github.com/aya-rs/aya/commit/45df2519b6
)) - Merge pull request #735 from aya-rs/log-option-not-result ([`ecf0dd9
`](https://github.com/aya-rs/aya/commit/ecf0dd9739
)) - S/Result/Option/ ([`ca3f70b
`](https://github.com/aya-rs/aya/commit/ca3f70b16a
)) - Remove pointless DefaultLogger ([`00d265c
`](https://github.com/aya-rs/aya/commit/00d265c51b
)) - Merge pull request #667 from vadorovsky/workspace-dependencies ([`f554d42
`](https://github.com/aya-rs/aya/commit/f554d42105
)) - Define dependencies on the workspace level ([`96fa08b
`](https://github.com/aya-rs/aya/commit/96fa08bd82
)) - Merge pull request #666 from aya-rs/toml-fmt ([`dc3b0b8
`](https://github.com/aya-rs/aya/commit/dc3b0b8730
)) - Add formatter and check in CI ([`c8bf646
`](https://github.com/aya-rs/aya/commit/c8bf646ef0
)) - Merge pull request #650 from aya-rs/test-cleanup ([`61608e6
`](https://github.com/aya-rs/aya/commit/61608e6458
)) - Remove "async" feature ([`fa91fb4
`](https://github.com/aya-rs/aya/commit/fa91fb4f59
)) - Unify IP format hints into one, repsesent it by `:i` token ([`84e5e28
`](https://github.com/aya-rs/aya/commit/84e5e2894f
)) - Remove some useless code ([`d999a95
`](https://github.com/aya-rs/aya/commit/d999a95b41
)) - Check format and value type in proc macro ([`0970300`](https://github.com/aya-rs/aya/commit/0970300d1f
)) - Merge pull request #585 from probulate/tag-len-value ([`5165bf2
`](https://github.com/aya-rs/aya/commit/5165bf2f99
)) - Support logging byte slices ([`d9f966e
`](https://github.com/aya-rs/aya/commit/d9f966ec9e
)) - Aya-log, aya-log-common: economize bytes ([`a4a69a6
`](https://github.com/aya-rs/aya/commit/a4a69a6bcf
)) - Check errors in tests ([`e4537e3
`](https://github.com/aya-rs/aya/commit/e4537e389a
)) - Aya-log, aya-log-common: Remove duplicate struct ([`490d7d5
`](https://github.com/aya-rs/aya/commit/490d7d587a
)) - Merge pull request #591 from vadorovsky/aya-log-impl-pod ([`3d3ce8b
`](https://github.com/aya-rs/aya/commit/3d3ce8bfa2
)) - Move the `Pod` implementations from aya-log-common to aya-log ([`5603d72
`](https://github.com/aya-rs/aya/commit/5603d7248a
)) - Merge pull request #484 from vadorovsky/update-tokio ([`bea0e83
`](https://github.com/aya-rs/aya/commit/bea0e83512
)) - Update Tokio and inventory ([`dad75f4
`](https://github.com/aya-rs/aya/commit/dad75f45ac
)) - Don't panic in init when bpf programs don't log ([`12927cf
`](https://github.com/aya-rs/aya/commit/12927cf699
)) - Merge pull request #456 from dmitris/uninlined_format_args ([`16b029e
`](https://github.com/aya-rs/aya/commit/16b029ed37
)) - Fix uninlined_format_args clippy issues ([`055d94f
`](https://github.com/aya-rs/aya/commit/055d94f58b
)) - Merge pull request #449 from aya-rs/dependabot/cargo/env_logger-0.10 ([`f9bef9f
`](https://github.com/aya-rs/aya/commit/f9bef9f8c0
)) - Update env_logger requirement from 0.9 to 0.10 ([`1c8088b
`](https://github.com/aya-rs/aya/commit/1c8088b16c
)) - Revert "aya-log, aya-log-common: temporarily revert to old map API so we can release" ([`0b41018
`](https://github.com/aya-rs/aya/commit/0b41018ee2
))
{: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
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 addressesIt 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
In practice, it means that doing this kind of checks is not going to be needed in eBPF program code anymore:
832bdd2
`](https://github.com/aya-rs/aya/commit/832bdd280c
)) - Aya-log, aya-log-common: temporarily revert to old map API so we can release ([`0d040d2
`](https://github.com/aya-rs/aya/commit/0d040d2290
)) - Merge pull request #436 from vadorovsky/aya-log-mac-addr ([`3adb9b0
`](https://github.com/aya-rs/aya/commit/3adb9b049f
)) - Add format hints for MAC addresses ([`2223ab8
`](https://github.com/aya-rs/aya/commit/2223ab828d
)) - Merge pull request #397 from astoycos/refactor-map-api2 ([`d6cb1a1
`](https://github.com/aya-rs/aya/commit/d6cb1a16ad
)) - Make map APIs return an option ([`f3262e8
`](https://github.com/aya-rs/aya/commit/f3262e87bd
)) - Core refactor of Map API ([`1aefa2e
`](https://github.com/aya-rs/aya/commit/1aefa2e5e6
)) - Merge pull request #390 from dave-tucker/clippy-up ([`367ab20
`](https://github.com/aya-rs/aya/commit/367ab20305
)) - Make miri happy ([`b2924a3
`](https://github.com/aya-rs/aya/commit/b2924a3a26
)) - Aya-log, aya-log-common: start next development iteration 0.1.12-dev.0 ([`6f0637a
`](https://github.com/aya-rs/aya/commit/6f0637a6c8
)) - Aya-log, aya-log-common: release version 0.1.11 ([`ba927ac
`](https://github.com/aya-rs/aya/commit/ba927ac204
)) - Add display hints ([`83ec27f
`](https://github.com/aya-rs/aya/commit/83ec27f06b
)) - Change from Rust edition 2018 to 2021 ([`944d6b8
`](https://github.com/aya-rs/aya/commit/944d6b8a16
)) - Merge pull request #361 from chenhengqi/fix-aya-log-links ([`632ea30
`](https://github.com/aya-rs/aya/commit/632ea300ed
)) - Fix links to aya-log repo ([`b8b291c
`](https://github.com/aya-rs/aya/commit/b8b291c51b
)) - Merge pull request #357 from vadorovsky/env_logger ([`3d5ab0b
`](https://github.com/aya-rs/aya/commit/3d5ab0b17d
)) - Aya-log, test: Switch from simplelog to env_logger ([`3664e1e
`](https://github.com/aya-rs/aya/commit/3664e1ea0d
)) - Merge pull request #353 from vadorovsky/log-remove-u128 ([`d968094
`](https://github.com/aya-rs/aya/commit/d968094b66
)) - Remove i128 and u128 types ([`611f967
`](https://github.com/aya-rs/aya/commit/611f967cd1
)) - Merge pull request #350 from dave-tucker/monorepo ([`f37a514
`](https://github.com/aya-rs/aya/commit/f37a51433f
)) - Re-organize into a single workspace ([`dc31e11
`](https://github.com/aya-rs/aya/commit/dc31e11691
)) - Fix the log buffer bounds ([`28abaec
`](https://github.com/aya-rs/aya/commit/28abaece2a
)) - Ensure log buffer bounds ([`2e07028
`](https://github.com/aya-rs/aya/commit/2e0702854b
)) - Use new PerCpuArray::get_ptr_mut API ([`6aea880
`](https://github.com/aya-rs/aya/commit/6aea880890
)) - Aya-log, aya-log-common: start next development iteration 0.1.11-dev.0 ([`526493b
`](https://github.com/aya-rs/aya/commit/526493b444
)) - Aya-log, aya-log-common: release version 0.1.10 ([`3abd973
`](https://github.com/aya-rs/aya/commit/3abd97307e
)) - Update aya requirement from 0.10.7 to 0.11.0 ([`060ba45
`](https://github.com/aya-rs/aya/commit/060ba45153
)) - Add CI ([`0038b43
`](https://github.com/aya-rs/aya/commit/0038b43627
)) - Add vim/vscode rust-analyzer settings ([`c1bb790
`](https://github.com/aya-rs/aya/commit/c1bb790c0d
)) - Add rustfmt.toml ([`3f00851
`](https://github.com/aya-rs/aya/commit/3f0085195f
)) - Add example ([`5789585`](https://github.com/aya-rs/aya/commit/5789585994
)) - Add Tests ([`5d82d9a
`](https://github.com/aya-rs/aya/commit/5d82d9a73e
)) - Ensure the bounds of log buffer ([`628b473
`](https://github.com/aya-rs/aya/commit/628b473e09
)) - Bump the buffer size ([`70b4e68
`](https://github.com/aya-rs/aya/commit/70b4e68130
)) - Aya-log, aya-log-common: start next development iteration 0.1.10-dev.0 ([`bd9a5c8
`](https://github.com/aya-rs/aya/commit/bd9a5c8fdf
)) - Aya-log, aya-log-common: release version 0.1.9 ([`8bc1bbb
`](https://github.com/aya-rs/aya/commit/8bc1bbb3ab
)) - Add cargo-release config ([`a8d133f
`](https://github.com/aya-rs/aya/commit/a8d133f6b0
)) - Do not release ([`d1a0ce5
`](https://github.com/aya-rs/aya/commit/d1a0ce51ee
)) - Use stricter version for the aya-log-common dep ([`c4d89fa
`](https://github.com/aya-rs/aya/commit/c4d89fa13c
)) - Inline write_record_header ([`bdb2750
`](https://github.com/aya-rs/aya/commit/bdb2750e66
)) - Update aya to 0.10.7 ([`81befa0
`](https://github.com/aya-rs/aya/commit/81befa0661
)) - Format arguments in userspace ([`ca1fe7e
`](https://github.com/aya-rs/aya/commit/ca1fe7e05f
)) - Don't recompute the record length ([`9b229d0
`](https://github.com/aya-rs/aya/commit/9b229d00e1
)) - Initialize AYA_LOGS with max_entries=0 ([`7f8d705
`](https://github.com/aya-rs/aya/commit/7f8d7057df
)) - Fix clippy warning ([`2800454`](https://github.com/aya-rs/aya/commit/2800454763
)) - Add copy of README.md inside aya-log/ ([`8bde15d
`](https://github.com/aya-rs/aya/commit/8bde15dad7
)) - Add missing manifest fields ([`5e18a71
`](https://github.com/aya-rs/aya/commit/5e18a715b2
)) - (cargo-release) version 0.1.1 ([`31e71f8
`](https://github.com/aya-rs/aya/commit/31e71f8db5
)) - (cargo-release) version 0.1.1 ([`29955b2
`](https://github.com/aya-rs/aya/commit/29955b2287
)) - Git add .cargo and xtask ([`6d14a16
`](https://github.com/aya-rs/aya/commit/6d14a16d8e
)) - Update to aya 0.10.5 ([`cced3da
`](https://github.com/aya-rs/aya/commit/cced3da5c8
)) - Simplify BpfLogger::init ([`9ab9c80
`](https://github.com/aya-rs/aya/commit/9ab9c80183
)) - Minor tweaks to make the verifier's job easier ([`2ac4334
`](https://github.com/aya-rs/aya/commit/2ac433449c
)) - Switch to aya-ufmt ([`b14d4ba
`](https://github.com/aya-rs/aya/commit/b14d4bab2f
)) - Use aya_ebpf::maps::PerfEventByteArray to output logs ([`22d8f86
`](https://github.com/aya-rs/aya/commit/22d8f86fbb
)) - Use aya_log_ebpf::ufmt instead of ::ufmt ([`741957f
`](https://github.com/aya-rs/aya/commit/741957f945
)) - Add ufmt to readme ([`0d7ac3e
`](https://github.com/aya-rs/aya/commit/0d7ac3eb3e
)) - Update readme ([`5df853c
`](https://github.com/aya-rs/aya/commit/5df853cfb0
)) - Initial commit ([`b29a061
`](https://github.com/aya-rs/aya/commit/b29a061bce
))