diff --git a/crates/bpf-builder/include/loop.bpf.h b/crates/bpf-builder/include/loop.bpf.h index 81674619..26a7fe35 100644 --- a/crates/bpf-builder/include/loop.bpf.h +++ b/crates/bpf-builder/include/loop.bpf.h @@ -16,14 +16,7 @@ // function seems to cause issues. #ifdef FEATURE_BPF_LOOP #define LOOP(max_iterations, max_unroll, callback_fn, ctx) \ - if (bpf_core_enum_value_exists(enum bpf_func_id, BPF_FUNC_loop)) { \ - bpf_loop(max_iterations, callback_fn, ctx, 0); \ - } else { \ - _Pragma("unroll") for (int i = 0; i < max_unroll; i++) { \ - if (callback_fn(i, ctx) == LOOP_STOP) \ - break; \ - } \ - } + bpf_loop(max_iterations, callback_fn, ctx, 0); #else // On kernel <= 5.13 taking the address of a function results in a verifier // error, even if inside a dead-code elimination branch.