From: David Vernet <void@manifault.com>
To: Zheng Yejian <zhengyejian1@huawei.com>
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, song@kernel.org, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org, corbet@lwn.net,
bpf@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf] bpf, docs: Correct the example of BPF_XOR
Date: Tue, 29 Nov 2022 12:54:10 -0600 [thread overview]
Message-ID: <Y4ZVUiwGnVIj/V4U@maniforge.lan> (raw)
In-Reply-To: <20221129134558.2757043-1-zhengyejian1@huawei.com>
On Tue, Nov 29, 2022 at 09:45:58PM +0800, Zheng Yejian wrote:
> 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
Shouldn't this be
dst_reg = (u32) dst_reg ^ (u32) src_reg
Same idea below for 64 bit
>
> ``BPF_XOR | BPF_K | BPF_ALU64`` means::
>
> - src_reg = src_reg ^ imm32
> + dst_reg = dst_reg ^ imm32
>
>
> Byte swap instructions
> --
> 2.25.1
>
next prev parent reply other threads:[~2022-11-29 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 13:45 Zheng Yejian
2022-11-29 18:54 ` David Vernet [this message]
2022-11-30 1:17 ` Zheng Yejian
2022-12-02 21:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y4ZVUiwGnVIj/V4U@maniforge.lan \
--to=void@manifault.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.com \
--cc=zhengyejian1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®