Registers
Register variables (reg) are stored in CPU registers and are mutable. They are the primary way to store and manipulate data in eBPF programs.
Declaration
reg my_var = 10;
reg result = a + b;
Characteristics
- Mutable: values can be changed during program execution
- Stored in CPU registers for fast access
- Primary data storage mechanism in eBPF programs