bpf: Implement arena list management with allocation and deletion

This commit introduces a new BPF program that manages an arena list, allowing for the addition and deletion of elements. The following changes were made:

- Added `arena_list.bpf.c` to implement BPF functions for adding and deleting elements in an arena list.
- Created `arena_list.c` for user-space testing of the BPF program, including functions to sum elements and validate the arena list operations.
- Introduced `bpf_arena_alloc.h` and `bpf_arena_common.h` for memory allocation and common definitions related to arena management.
- Defined `bpf_arena_list.h` to establish the structure of the arena list nodes and heads.
- Added `bpf_experimental.h` to include experimental BPF features and helper functions for object management.

These changes enhance the BPF capabilities for managing memory in a structured way, facilitating efficient allocation and deallocation of resources.
This commit is contained in:
yunwei37
2025-10-04 21:39:24 -07:00
parent dc217d2def
commit ba1a6a472e
8 changed files with 1118 additions and 0 deletions

4
src/features/bpf_arena/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/.output
/bootstrap
xdp-pktgen
arena_list