summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLeon Hwang <leon.hwang@linux.dev>2026-01-07 10:20:21 +0800
committerAlexei Starovoitov <ast@kernel.org>2026-01-06 20:48:32 -0800
commit2546863b4a723c96f55af7127827d62632cfbc9c (patch)
treeda5a01a96cec643ca03e0546b7dbd26b4518b132 /scripts
parent47c79f05aa0d289f760caf5ad6521fd8dbae37a1 (diff)
libbpf: Add BPF_F_CPU and BPF_F_ALL_CPUS flags support for percpu maps
Add libbpf support for the BPF_F_CPU flag for percpu maps by embedding the cpu info into the high 32 bits of: 1. **flags**: bpf_map_lookup_elem_flags(), bpf_map__lookup_elem(), bpf_map_update_elem() and bpf_map__update_elem() 2. **opts->elem_flags**: bpf_map_lookup_batch() and bpf_map_update_batch() And the flag can be BPF_F_ALL_CPUS, but cannot be 'BPF_F_CPU | BPF_F_ALL_CPUS'. Behavior: * If the flag is BPF_F_ALL_CPUS, the update is applied across all CPUs. * If the flag is BPF_F_CPU, it updates value only to the specified CPU. * If the flag is BPF_F_CPU, lookup value only from the specified CPU. * lookup does not support BPF_F_ALL_CPUS. Acked-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Leon Hwang <leon.hwang@linux.dev> Link: https://lore.kernel.org/r/20260107022022.12843-7-leon.hwang@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions