mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
selftests/bpf: Use producer_cnt to allocate local counter array
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>
This commit is contained in:
parent
e2fa5c2068
commit
8ad663d3df
@ -40,7 +40,7 @@ static void count_local_setup(void)
|
||||
{
|
||||
struct count_local_ctx *ctx = &count_local_ctx;
|
||||
|
||||
ctx->hits = calloc(env.consumer_cnt, sizeof(*ctx->hits));
|
||||
ctx->hits = calloc(env.producer_cnt, sizeof(*ctx->hits));
|
||||
if (!ctx->hits)
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user