aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Thaler <dthaler1968@googlemail.com>2024-05-25 08:33:32 -0700
committerAlexei Starovoitov <ast@kernel.org>2024-05-25 10:41:57 -0700
commitf980f13e4eb299abba6692365315196e1ba6fd2c (patch)
treecf2ec6c3b4a9fd8bcf0788af163eaa9be5367004
parent6a6d8b6f00ade597e0030669fae3fdf57cfba33b (diff)
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: Dave Thaler <dthaler1968@gmail.com> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20240525153332.21355-1-dthaler1968@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r--Documentation/bpf/standardization/instruction-set.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Documentation/bpf/standardization/instruction-set.rst b/Documentation/bpf/standardization/instruction-set.rst
index 1602454fe7cf..08f614b10a56 100644
--- a/Documentation/bpf/standardization/instruction-set.rst
+++ b/Documentation/bpf/standardization/instruction-set.rst
@@ -552,9 +552,10 @@ is outside the scope of this document and is left for future work.
Program-local functions
~~~~~~~~~~~~~~~~~~~~~~~
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
-``JA``. The offset is encoded in the 'imm' field of the call instruction.
-An ``EXIT`` within the program-local function will return to the caller.
+caller, and are referenced by offset from the instruction following the call
+instruction, similar to ``JA``. The offset is encoded in the 'imm' field of
+the call instruction. An ``EXIT`` within the program-local function will
+return to the caller.
Load and store instructions
===========================