From a0b7befc841b0a400ecc2aa9b31a8308baec4418 Mon Sep 17 00:00:00 2001 From: pythops Date: Thu, 12 Sep 2024 16:26:53 +0200 Subject: [PATCH] use RawPacket::LEN for ringbuf size --- oryx-ebpf/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oryx-ebpf/src/main.rs b/oryx-ebpf/src/main.rs index 5effef1..bbafe9a 100644 --- a/oryx-ebpf/src/main.rs +++ b/oryx-ebpf/src/main.rs @@ -19,7 +19,7 @@ use network_types::{ use oryx_common::{ip::ProtoHdr, RawPacket}; #[map] -static DATA: RingBuf = RingBuf::with_byte_size(4096 * 40, 0); +static DATA: RingBuf = RingBuf::with_byte_size(4096 * RawPacket::LEN as u32, 0); #[classifier] pub fn oryx(ctx: TcContext) -> i32 {