bpf: Add CGROUP prefix to cgroup_iter_order
authorHao Luo <haoluo@google.com>
Thu, 25 Aug 2022 22:39:36 +0000 (15:39 -0700)
committerMartin KaFai Lau <kafai@fb.com>
Thu, 25 Aug 2022 23:26:37 +0000 (16:26 -0700)
commitd4ffb6f39f1a1b260966b43a4ffdb64779c650dd
tree38ff9a649acc46e6e2b04b6a38b973b217e98b35
parent0a0d55ef3e61d9f14e803cacb644fcc890f16774
bpf: Add CGROUP prefix to cgroup_iter_order

bpf_cgroup_iter_order is globally visible but the entries do not have
CGROUP prefix. As requested by Andrii, put a CGROUP in the names
in bpf_cgroup_iter_order.

This patch fixes two previous commits: one introduced the API and
the other uses the API in bpf selftest (that is, the selftest
cgroup_hierarchical_stats).

I tested this patch via the following command:

  test_progs -t cgroup,iter,btf_dump

Fixes: d4ccaf58a847 ("bpf: Introduce cgroup iter")
Fixes: 88886309d2e8 ("selftests/bpf: add a selftest for cgroup hierarchical stats collection")
Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Hao Luo <haoluo@google.com>
Link: https://lore.kernel.org/r/20220825223936.1865810-1-haoluo@google.com
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
include/uapi/linux/bpf.h
kernel/bpf/cgroup_iter.c
tools/include/uapi/linux/bpf.h
tools/testing/selftests/bpf/prog_tests/btf_dump.c
tools/testing/selftests/bpf/prog_tests/cgroup_hierarchical_stats.c
tools/testing/selftests/bpf/prog_tests/cgroup_iter.c