* [PATCH bpf-next] Fix definition of BPF_NEG operation
@ 2023-06-27 21:39 ` Dave Thaler
0 siblings, 0 replies; 5+ messages in thread
From: Dave Thaler @ 2023-06-27 21:39 UTC (permalink / raw)
To: bpf; +Cc: bpf, Dave Thaler
From: Dave Thaler <dthaler@microsoft.com>
Instruction is an arithmetic negative, not a bitwise inverse.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
---
Documentation/bpf/instruction-set.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst
index 6644842cd3e..751e657973f 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
--
2.33.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Bpf] [PATCH bpf-next] Fix definition of BPF_NEG operation
@ 2023-06-27 21:39 ` Dave Thaler
0 siblings, 0 replies; 5+ messages in thread
From: Dave Thaler @ 2023-06-27 21:39 UTC (permalink / raw)
To: bpf; +Cc: bpf, Dave Thaler
From: Dave Thaler <dthaler@microsoft.com>
Instruction is an arithmetic negative, not a bitwise inverse.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
---
Documentation/bpf/instruction-set.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst
index 6644842cd3e..751e657973f 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
--
2.33.4
--
Bpf mailing list
Bpf@ietf.org
https://www.ietf.org/mailman/listinfo/bpf
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Bpf] [PATCH bpf-next] Fix definition of BPF_NEG operation
@ 2023-06-27 21:46 ` David Vernet
0 siblings, 0 replies; 5+ messages in thread
From: David Vernet @ 2023-06-27 21:46 UTC (permalink / raw)
To: Dave Thaler; +Cc: bpf, bpf, Dave Thaler
On Tue, Jun 27, 2023 at 09:39:12PM +0000, Dave Thaler wrote:
> From: Dave Thaler <dthaler@microsoft.com>
>
> Instruction is an arithmetic negative, not a bitwise inverse.
>
> Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Acked-by: David Vernet <void@manifault.com>
> ---
> Documentation/bpf/instruction-set.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst
> index 6644842cd3e..751e657973f 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
> --
> 2.33.4
>
> --
> Bpf mailing list
> Bpf@ietf.org
> https://www.ietf.org/mailman/listinfo/bpf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bpf] [PATCH bpf-next] Fix definition of BPF_NEG operation
@ 2023-06-27 21:46 ` David Vernet
0 siblings, 0 replies; 5+ messages in thread
From: David Vernet @ 2023-06-27 21:46 UTC (permalink / raw)
To: Dave Thaler; +Cc: bpf, bpf, Dave Thaler
On Tue, Jun 27, 2023 at 09:39:12PM +0000, Dave Thaler wrote:
> From: Dave Thaler <dthaler@microsoft.com>
>
> Instruction is an arithmetic negative, not a bitwise inverse.
>
> Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Acked-by: David Vernet <void@manifault.com>
> ---
> Documentation/bpf/instruction-set.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst
> index 6644842cd3e..751e657973f 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
> --
> 2.33.4
>
> --
> Bpf mailing list
> Bpf@ietf.org
> https://www.ietf.org/mailman/listinfo/bpf
--
Bpf mailing list
Bpf@ietf.org
https://www.ietf.org/mailman/listinfo/bpf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH bpf-next] Fix definition of BPF_NEG operation
2023-06-27 21:39 ` [Bpf] " Dave Thaler
(?)
(?)
@ 2023-06-29 14:00 ` patchwork-bot+netdevbpf
-1 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-29 14:00 UTC (permalink / raw)
To: Dave Thaler; +Cc: bpf, bpf, dthaler
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Tue, 27 Jun 2023 21:39:12 +0000 you wrote:
> From: Dave Thaler <dthaler@microsoft.com>
>
> Instruction is an arithmetic negative, not a bitwise inverse.
>
> Signed-off-by: Dave Thaler <dthaler@microsoft.com>
> ---
> Documentation/bpf/instruction-set.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [bpf-next] Fix definition of BPF_NEG operation
https://git.kernel.org/bpf/bpf-next/c/85b0c6d4905e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-29 14:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27 21:39 [PATCH bpf-next] Fix definition of BPF_NEG operation Dave Thaler
2023-06-27 21:39 ` [Bpf] " Dave Thaler
2023-06-27 21:46 ` David Vernet
2023-06-27 21:46 ` David Vernet
2023-06-29 14:00 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.