From: Donggeun Yoo <donggeunyoo.kernel@gmail.com>
To: Leon Hwang <leon.hwang@linux.dev>, bpf@vger.kernel.org
Cc: Donggeun Yoo <donggeunyoo.kernel@gmail.com>,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
eddyz87@gmail.com, memxor@gmail.com, martin.lau@linux.dev,
song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org,
emil@etsalapatis.com, ihor.solodrai@linux.dev,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf v2 1/2] bpf: Zero-fill other CPUs when BPF_F_CPU creates a per-cpu hash element
Date: Thu, 24 Sep 2026 19:22:54 +0900 [thread overview]
Message-ID: <20260924102254.2120344-1-donggeunyoo.kernel@gmail.com> (raw)
In-Reply-To: <0a30f489-6771-4798-ab59-b658ef4c24f0@linux.dev>
On Wed, 23 Sep 2026 10:09:40 +0800, Leon Hwang wrote:
> 'onallcpus ? map_flags >> 32' does not look reasonable.
>
> Based on the 'if' above, either of these looks straightforward to me.
>
> int init_cpu = !onallcpus ? raw_smp_processor_id() : map_flags >> 32;
>
> or
>
> int init_cpu = (map_flags & BPF_F_CPU) ? map_flags >> 32 :
> raw_smp_processor_id();
Agreed, v3 takes the second.
Thanks,
Donggeun
next prev parent reply other threads:[~2026-09-24 10:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 0:07 [PATCH bpf v2 0/2] bpf: fix per-cpu initialization of a BPF_F_CPU created " Donggeun Yoo
2026-09-23 0:08 ` [PATCH bpf v2 1/2] bpf: Zero-fill other CPUs when BPF_F_CPU creates a per-cpu " Donggeun Yoo
2026-09-23 0:56 ` bot+bpf-ci
2026-09-24 10:23 ` Donggeun Yoo
2026-09-23 2:09 ` Leon Hwang
2026-09-24 10:22 ` Donggeun Yoo [this message]
2026-09-23 0:08 ` [PATCH bpf v2 2/2] selftests/bpf: Test per-cpu initialization of a BPF_F_CPU created element Donggeun Yoo
2026-09-23 0:56 ` bot+bpf-ci
2026-09-24 10:23 ` Donggeun Yoo
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=20260924102254.2120344-1-donggeunyoo.kernel@gmail.com \
--to=donggeunyoo.kernel@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=jolsa@kernel.org \
--cc=leon.hwang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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®