Commit 8ad663d3 authored by Hou Tao's avatar Hou Tao Committed by Alexei Starovoitov
Browse files

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: default avatarHou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20230613080921.1623219-2-houtao@huaweicloud.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent e2fa5c20
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}