aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
diff options
context:
space:
mode:
authorAnton Protopopov <[email protected]>2023-07-06 13:39:30 +0000
committerAlexei Starovoitov <[email protected]>2023-07-06 19:42:25 +0000
commit9bc421b6be955c0960356210960d82707aa009e8 (patch)
treef57af088ca4bb96965c2369626f13b187ea6d0d7 /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
parentbpf: add a new kfunc to return current bpf_map elements count (diff)
downloadkernel-9bc421b6be955c0960356210960d82707aa009e8.tar.gz
kernel-9bc421b6be955c0960356210960d82707aa009e8.zip
bpf: populate the per-cpu insertions/deletions counters for hashmaps
Initialize and utilize the per-cpu insertions/deletions counters for hash-based maps. Non-trivial changes only apply to the preallocated maps for which the {inc,dec}_elem_count functions are not called, as there's no need in counting elements to sustain proper map operations. To increase/decrease percpu counters for preallocated maps we add raw calls to the bpf_map_{inc,dec}_elem_count functions so that the impact is minimal. For dynamically allocated maps we add corresponding calls to the existing {inc,dec}_elem_count functions. Signed-off-by: Anton Protopopov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c')
0 files changed, 0 insertions, 0 deletions