]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Merge branch 'bpf-support-atomic-update-for-htab-of-maps'
authorAlexei Starovoitov <ast@kernel.org>
Thu, 10 Apr 2025 03:12:54 +0000 (20:12 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 10 Apr 2025 03:12:54 +0000 (20:12 -0700)
commita27a97f713947b20ba91b23a3ef77fa92d74171b
treee9e00761dd4013c0d79131ba93ab6993c30d6260
parent5a15a050df714959f0d5a57ac3201bd1c6594984
parent7c6fb1cf33fb9a7b89a0d9feada957d0fe56de6f
Merge branch 'bpf-support-atomic-update-for-htab-of-maps'

Hou Tao says:

====================
bpf: Support atomic update for htab of maps

From: Hou Tao <houtao1@huawei.com>

Hi,

The motivation for the patch set comes from the question raised by Cody
Haas [1]. When trying to concurrently lookup and update an existing
element in a htab of maps, the lookup procedure may return -ENOENT
unexpectedly. The first revision of the patch set tried to resolve the
problem by making the insertion of the new element and the deletion of
the old element being atomic from the perspective of the lookup process.
While the solution would benefit all hash maps, it does not fully
resolved the problem due to the immediate reuse issue. Therefore, in v2
of the patch set, it only fixes the problem for fd htab.

Please see individual patches for details. Comments are always welcome.

v3:
 * rebase on bpf_next/for-next
 * add Acked-by tags

v2: https://lore.kernel.org/bpf/20250308135110.953269-1-houtao@huaweicloud.com/
  * only support atomic update for fd htab

v1: https://lore.kernel.org/bpf/20250204082848.13471-1-hotforest@gmail.com

[1]: https://lore.kernel.org/xdp-newbies/CAH7f-ULFTwKdoH_t2SFc5rWCVYLEg-14d1fBYWH2eekudsnTRg@mail.gmail.com/
====================

Link: https://patch.msgid.link/20250401062250.543403-1-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>