diff options
author | Anton Protopopov <aspsk@isovalent.com> | 2023-07-06 13:39:30 +0000 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-07-06 12:42:25 -0700 |
commit | 9bc421b6be955c0960356210960d82707aa009e8 (patch) | |
tree | f57af088ca4bb96965c2369626f13b187ea6d0d7 /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c | |
parent | 803370d3d37579e080e8c59f2360a072d0e45aff (diff) |
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 <aspsk@isovalent.com>
Link: https://lore.kernel.org/r/20230706133932.45883-4-aspsk@isovalent.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c')
0 files changed, 0 insertions, 0 deletions