Revert "aya-log, aya-log-common: temporarily revert to old map API so we can release"

This reverts commit 0d040d2290.
pull/444/head
Alessandro Decina 2 years ago
parent 832bdd280c
commit 0b41018ee2

@ -14,7 +14,7 @@ default = []
userspace = [ "aya" ] userspace = [ "aya" ]
[dependencies] [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 } num_enum = { version = "0.5", default-features = false }
[lib] [lib]

@ -11,7 +11,7 @@ documentation = "https://docs.rs/aya-log"
edition = "2021" edition = "2021"
[dependencies] [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"] } aya-log-common = { path = "../aya-log-common", version = "0.1.13", features=["userspace"] }
thiserror = "1" thiserror = "1"
log = "0.4" log = "0.4"

@ -90,7 +90,7 @@ impl BpfLogger {
logger: T, logger: T,
) -> Result<BpfLogger, Error> { ) -> Result<BpfLogger, Error> {
let logger = Arc::new(logger); 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)? { for cpu_id in online_cpus().map_err(Error::InvalidOnlineCpu)? {
let mut buf = logs.open(cpu_id, None)?; let mut buf = logs.open(cpu_id, None)?;

Loading…
Cancel
Save