@@ -304,11 +304,16 @@ set of function calls exposed by the eBPF runtime. Each helper
304
304
function is identified by an integer used in a ``BPF_CALL `` instruction.
305
305
The available helper functions may differ for each eBPF program type.
306
306
307
- Each helper function is implemented with a commonly shared function
307
+ Conceptually, each helper function is implemented with a commonly shared function
308
308
signature defined as:
309
309
310
310
uint64_t function(uint64_t r1, uint64_t r2, uint64_t r3, uint64_t r4, uint64_t r5)
311
311
312
+ In actuality, each helper function is defined as taking between 0 and 5 arguments,
313
+ with the remaining registers being ignored. The definition of a helper function
314
+ is responsible for specifying the type (e.g., integer, pointer, etc.) of the value returned,
315
+ the number of arguments, and the type of each argument.
316
+
312
317
Load and store instructions
313
318
===========================
314
319
@@ -523,7 +528,7 @@ opcode imm description reference
523
528
0x24 any dst = (uint32_t)(dst * imm) `Arithmetic instructions`_
524
529
0x25 any if dst > imm goto +offset `Jump instructions`_
525
530
0x26 any if (uint32_t)dst > imm goto +offset `Jump instructions`_
526
- 0x27 any dst *= imm `Arithmetic instructions`_
531
+ 0x27 any dst \ * = imm `Arithmetic instructions`_
527
532
0x28 any dst = ntohs(*(uint16_t *)(R6->data + imm)) `Load and store instructions`_
528
533
0x2c 0x00 dst = (uint32_t)(dst * src) `Arithmetic instructions`_
529
534
0x2d 0x00 if dst > src goto +offset `Jump instructions`_
0 commit comments