All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Masoud Aghasi" <maghasi@disroot.org>, <bpf@vger.kernel.org>
Cc: <andrii@kernel.org>, <eddyz87@gmail.com>, <daniel@iogearbox.net>,
	<memxor@gmail.com>, <martin.lau@linux.dev>, <song@kernel.org>,
	<yonghong.song@linux.dev>, <jolsa@kernel.org>,
	<emil@etsalapatis.com>, <ihor.solodrai@linux.dev>,
	<leon.hwang@linux.dev>
Subject: Re: [PATCH v2 2/2] selftests/bpf: add test for percpu map flags combination
Date: Thu, 01 Oct 2026 15:37:23 +0000	[thread overview]
Message-ID: <DLTM3D36ENNF.3IH79JXEGYZAX@gmail.com> (raw)
In-Reply-To: <20260930135753.1063495-3-maghasi@disroot.org>

On Wed, Sep 30, 2026 at 02:57 PM Masoud Aghasi <maghasi@disroot.org> wrote:
> +	flags = BPF_F_CPU | BPF_EXIST;
> +	err = bpf_map_update_elem(map_fd, &key, &val, flags);
> +	ASSERT_EQ(err, -ENOENT, "bpf_map_update_elem flags_combo");

The map is empty, so lru_percpu_hash test passes without
the __htab_lru_percpu_map_update_elem() hunk that v2 added to patch 1.
The check_flags() change alone is enough to get -ENOENT.
Insert the key first and then update it with BPF_F_CPU | BPF_EXIST.
With max_entries == 1 prealloc_lru_pop() evicts that key and
the update fails with -ENOENT without that hunk.

percpu_array changes are not tested at all.
Not even BPF_F_ALL_CPUS | BPF_EXIST from the commit log of patch 1.

pw-bot: cr

  parent reply	other threads:[~2026-10-01 15:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 13:57 [PATCH v2 0/2] bpf: Fix incorrect handling of user flags by percpu map updates Masoud Aghasi
2026-09-30 13:57 ` [PATCH v2 1/2] " Masoud Aghasi
2026-10-01 15:16   ` Leon Hwang
2026-10-02  5:34     ` Masoud Aghasi
2026-09-30 13:57 ` [PATCH v2 2/2] selftests/bpf: add test for percpu map flags combination Masoud Aghasi
2026-09-30 14:42   ` bot+bpf-ci
2026-10-01 15:17   ` Leon Hwang
2026-10-02  5:36     ` Masoud Aghasi
2026-10-01 15:37   ` Alexei Starovoitov [this message]
2026-10-02  5:45     ` Masoud Aghasi

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=DLTM3D36ENNF.3IH79JXEGYZAX@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@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=maghasi@disroot.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 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.