]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add lru_hash_lookup performance test
authorMartin KaFai Lau <kafai@fb.com>
Fri, 1 Sep 2017 06:27:11 +0000 (23:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Sep 2017 16:57:38 +0000 (09:57 -0700)
commiteac8c2eda33703ab106f10499881034c85efa5f6
treeb422830fb0c110f940499c839b3cb1e2f2ef1f67
parent6f8d162e03bc1b296577b119b85833f1d6bfe073
bpf: Add lru_hash_lookup performance test

Create a new case to test the LRU lookup performance.

At the beginning, the LRU map is fully loaded (i.e. the number of keys
is equal to map->max_entries).   The lookup is done through key 0
to num_map_entries and then repeats from 0 again.

This patch also creates an anonymous struct to properly
name the test params in stress_lru_hmap_alloc() in map_perf_test_kern.c.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/map_perf_test_kern.c
samples/bpf/map_perf_test_user.c