diff --git a/src/ebpf_base.h b/src/ebpf_base.h index c44062d6f..812648329 100644 --- a/src/ebpf_base.h +++ b/src/ebpf_base.h @@ -40,11 +40,11 @@ typedef struct _ebpf_context_descriptor { // Maximum number of nested function calls allowed in eBPF programs. // This limit helps prevent stack overflow and ensures predictable behavior. -constexpr int MAX_CALL_STACK_FRAMES = 8; +#define MAX_CALL_STACK_FRAMES 8 // Stack space allocated for each subprogram (in bytes). // This ensures each function call has its own dedicated stack space. -constexpr int EBPF_SUBPROGRAM_STACK_SIZE = 512; +#define EBPF_SUBPROGRAM_STACK_SIZE 512 // Total stack space usable with nested subprogram calls. -constexpr int EBPF_TOTAL_STACK_SIZE = MAX_CALL_STACK_FRAMES * EBPF_SUBPROGRAM_STACK_SIZE; +#define EBPF_TOTAL_STACK_SIZE (MAX_CALL_STACK_FRAMES * EBPF_SUBPROGRAM_STACK_SIZE)