projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2fa5c2
)
selftests/bpf: Use producer_cnt to allocate local counter array
author
Hou Tao
<houtao1@huawei.com>
Tue, 13 Jun 2023 08:09:17 +0000
(16:09 +0800)
committer
Alexei Starovoitov
<ast@kernel.org>
Mon, 19 Jun 2023 20:26:42 +0000
(13:26 -0700)
For count-local benchmark, use producer_cnt instead of consumer_cnt when
allocating local counter array.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Link:
https://lore.kernel.org/r/20230613080921.1623219-2-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/benchs/bench_count.c
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/bpf/benchs/bench_count.c
b/tools/testing/selftests/bpf/benchs/bench_count.c
index 078972ce208e67023e23f11b790ff2ab1c679a9d..3768945ad08e9e6eec8b59b7dd22b1b19d10a445 100644
(file)
--- a/
tools/testing/selftests/bpf/benchs/bench_count.c
+++ b/
tools/testing/selftests/bpf/benchs/bench_count.c
@@
-40,7
+40,7
@@
static void count_local_setup(void)
{
struct count_local_ctx *ctx = &count_local_ctx;
- ctx->hits = calloc(env.
consum
er_cnt, sizeof(*ctx->hits));
+ ctx->hits = calloc(env.
produc
er_cnt, sizeof(*ctx->hits));
if (!ctx->hits)
exit(1);
}