From 0c77037537aa91398d32d05fc16d1c70143ad0f8 Mon Sep 17 00:00:00 2001 From: Christian Deacon Date: Sun, 23 Mar 2025 20:36:28 -0400 Subject: [PATCH] Unroll main filters loop to save instructions with BPF verifier and potentially improve performance. --- src/xdp/prog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xdp/prog.c b/src/xdp/prog.c index cea4f77..d00c62c 100644 --- a/src/xdp/prog.c +++ b/src/xdp/prog.c @@ -324,6 +324,7 @@ int xdp_prog_main(struct xdp_md *ctx) int action = 0; u64 block_time = 1; +#pragma unroll for (int i = 0; i < MAX_FILTERS; i++) { u32 key = i;