From 9b229d00e110a5b3b610ad567f8d15682c0b78e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alessandro=C2=A0Decina?= Date: Fri, 15 Oct 2021 10:30:21 +0000 Subject: [PATCH] Don't recompute the record length --- aya-log/aya-log-ebpf/src/macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aya-log/aya-log-ebpf/src/macros.rs b/aya-log/aya-log-ebpf/src/macros.rs index 2d2ee666..abc8a586 100644 --- a/aya-log/aya-log-ebpf/src/macros.rs +++ b/aya-log/aya-log-ebpf/src/macros.rs @@ -185,7 +185,7 @@ macro_rules! log { if let Ok(message_len) = $crate::write_record_message!(&mut buf.buf[header_len..], $($arg)+) { let record_len = header_len + message_len; if record_len <= $crate::LOG_BUF_CAPACITY { - let _ = unsafe { $crate::AYA_LOGS.output($ctx, &buf.buf[..header_len + message_len], 0) }; + let _ = unsafe { $crate::AYA_LOGS.output($ctx, &buf.buf[..record_len], 0) }; } }; }