lkml.org 
[lkml]   [2022]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH bpf] bpf, docs: Correct the example of BPF_XOR
Date
Refer to description of BPF_XOR, dst_reg should be used but not src_reg
in the examples.

Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
---
Documentation/bpf/instruction-set.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst
index 5d798437dad4..e672d5ec6cc7 100644
--- a/Documentation/bpf/instruction-set.rst
+++ b/Documentation/bpf/instruction-set.rst
@@ -122,11 +122,11 @@ BPF_END 0xd0 byte swap operations (see `Byte swap instructions`_ below)

``BPF_XOR | BPF_K | BPF_ALU`` means::

- src_reg = (u32) src_reg ^ (u32) imm32
+ dst_reg = (u32) dst_reg ^ (u32) imm32

``BPF_XOR | BPF_K | BPF_ALU64`` means::

- src_reg = src_reg ^ imm32
+ dst_reg = dst_reg ^ imm32


Byte swap instructions
--
2.25.1
\
 
 \ /
  Last update: 2022-11-29 14:46    [W:0.052 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site