summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorDave Thaler <dthaler@microsoft.com>2023-06-28 00:39:12 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2023-06-29 16:58:50 +0300
commit85b0c6d4905ec21cd22cb18da701aa02278ccc4c (patch)
tree4cf7d475e5e0f8ee45a12d89f1d99a3b6c8317f9 /Documentation
parentbbaf1ff06af49e856501024abbe161d96c1f0d66 (diff)
downloadlinux-85b0c6d4905ec21cd22cb18da701aa02278ccc4c.tar.xz
bpf, docs: Fix definition of BPF_NEG operation
Instruction is an arithmetic negative, not a bitwise inverse. Signed-off-by: Dave Thaler <dthaler@microsoft.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: David Vernet <void@manifault.com> Link: https://lore.kernel.org/bpf/20230627213912.951-1-dthaler1968@googlemail.com
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/bpf/instruction-set.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst
index 6644842cd3ea..751e657973f0 100644
--- a/Documentation/bpf/instruction-set.rst
+++ b/Documentation/bpf/instruction-set.rst
@@ -165,7 +165,7 @@ BPF_OR 0x40 dst \|= src
BPF_AND 0x50 dst &= src
BPF_LSH 0x60 dst <<= (src & mask)
BPF_RSH 0x70 dst >>= (src & mask)
-BPF_NEG 0x80 dst = ~src
+BPF_NEG 0x80 dst = -src
BPF_MOD 0x90 dst = (src != 0) ? (dst % src) : dst
BPF_XOR 0xa0 dst ^= src
BPF_MOV 0xb0 dst = src