Commit f980f13e authored by Dave Thaler's avatar Dave Thaler Committed by Alexei Starovoitov

bpf, docs: Clarify call local offset

In the Jump instructions section it explains that the offset is
"relative to the instruction following the jump instruction".
But the program-local section confusingly said "referenced by
offset from the call instruction, similar to JA".

This patch updates that sentence with consistent wording, saying
it's relative to the instruction following the call instruction.
Signed-off-by: default avatarDave Thaler <dthaler1968@gmail.com>
Acked-by: default avatarYonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240525153332.21355-1-dthaler1968@gmail.comSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 6a6d8b6f
...@@ -552,9 +552,10 @@ is outside the scope of this document and is left for future work. ...@@ -552,9 +552,10 @@ is outside the scope of this document and is left for future work.
Program-local functions Program-local functions
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
Program-local functions are functions exposed by the same BPF program as the Program-local functions are functions exposed by the same BPF program as the
caller, and are referenced by offset from the call instruction, similar to caller, and are referenced by offset from the instruction following the call
``JA``. The offset is encoded in the 'imm' field of the call instruction. instruction, similar to ``JA``. The offset is encoded in the 'imm' field of
An ``EXIT`` within the program-local function will return to the caller. the call instruction. An ``EXIT`` within the program-local function will
return to the caller.
Load and store instructions Load and store instructions
=========================== ===========================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment