Re: [Bpf] [PATCH bpf-next] Fix definition of BPF_NEG operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 27, 2023 at 09:39:12PM +0000, Dave Thaler wrote:
> From: Dave Thaler <dthaler@xxxxxxxxxxxxx>
> 
> Instruction is an arithmetic negative, not a bitwise inverse.
> 
> Signed-off-by: Dave Thaler <dthaler@xxxxxxxxxxxxx>

Acked-by: David Vernet <void@xxxxxxxxxxxxx>

> ---
>  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@xxxxxxxx
> https://www.ietf.org/mailman/listinfo/bpf




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux