From 0b41018ee27bfda9b1ea7dc422b34d3a08fc3fc6 Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Wed, 16 Nov 2022 17:13:52 +1100 Subject: [PATCH] Revert "aya-log, aya-log-common: temporarily revert to old map API so we can release" This reverts commit 0d040d2290cc1513c979c95538210abd7ee59ebb. --- aya-log-common/Cargo.toml | 2 +- aya-log/Cargo.toml | 2 +- aya-log/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aya-log-common/Cargo.toml b/aya-log-common/Cargo.toml index 60ef04ac..19c97fce 100644 --- a/aya-log-common/Cargo.toml +++ b/aya-log-common/Cargo.toml @@ -14,7 +14,7 @@ default = [] userspace = [ "aya" ] [dependencies] -aya = { version = "0.11.0", optional=true } +aya = { path = "../aya", version = "0.11.0", optional=true } num_enum = { version = "0.5", default-features = false } [lib] diff --git a/aya-log/Cargo.toml b/aya-log/Cargo.toml index e28b0036..f1fd581e 100644 --- a/aya-log/Cargo.toml +++ b/aya-log/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/aya-log" edition = "2021" [dependencies] -aya = { version = "0.11.0", features=["async_tokio"] } +aya = { path = "../aya", version = "0.11.0", features=["async_tokio"] } aya-log-common = { path = "../aya-log-common", version = "0.1.13", features=["userspace"] } thiserror = "1" log = "0.4" diff --git a/aya-log/src/lib.rs b/aya-log/src/lib.rs index 1f191c51..53f693bb 100644 --- a/aya-log/src/lib.rs +++ b/aya-log/src/lib.rs @@ -90,7 +90,7 @@ impl BpfLogger { logger: T, ) -> Result { let logger = Arc::new(logger); - let mut logs: AsyncPerfEventArray<_> = bpf.map_mut("AYA_LOGS").unwrap().try_into()?; + let mut logs: AsyncPerfEventArray<_> = bpf.take_map("AYA_LOGS").unwrap().try_into()?; for cpu_id in online_cpus().map_err(Error::InvalidOnlineCpu)? { let mut buf = logs.open(cpu_id, None)?;