]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bpf: Add BPF_F_CPU and BPF_F_ALL_CPUS flags support for percpu_cgroup_storage maps
authorLeon Hwang <leon.hwang@linux.dev>
Wed, 7 Jan 2026 02:20:20 +0000 (10:20 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 7 Jan 2026 04:48:32 +0000 (20:48 -0800)
commit47c79f05aa0d289f760caf5ad6521fd8dbae37a1
tree1769148115d0cca8615569e6b314719ede5a258c
parent8526397c3caf8d0289bab69bfb2c889e2b39b30a
bpf: Add BPF_F_CPU and BPF_F_ALL_CPUS flags support for percpu_cgroup_storage maps

Introduce BPF_F_ALL_CPUS flag support for percpu_cgroup_storage maps to
allow updating values for all CPUs with a single value for update_elem
API.

Introduce BPF_F_CPU flag support for percpu_cgroup_storage maps to
allow:

* update value for specified CPU for update_elem API.
* lookup value for specified CPU for lookup_elem API.

The BPF_F_CPU flag is passed via map_flags along with embedded cpu info.

Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/20260107022022.12843-6-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf-cgroup.h
include/linux/bpf.h
kernel/bpf/local_storage.c
kernel/bpf/syscall.c