mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-21 08:49:06 +08:00
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>
This commit is contained in:
@@ -88,11 +88,11 @@ struct bpf_cgroup_storage_key {
|
||||
};
|
||||
|
||||
enum bpf_cgroup_iter_order {
|
||||
BPF_ITER_ORDER_UNSPEC = 0,
|
||||
BPF_ITER_SELF_ONLY, /* process only a single object. */
|
||||
BPF_ITER_DESCENDANTS_PRE, /* walk descendants in pre-order. */
|
||||
BPF_ITER_DESCENDANTS_POST, /* walk descendants in post-order. */
|
||||
BPF_ITER_ANCESTORS_UP, /* walk ancestors upward. */
|
||||
BPF_CGROUP_ITER_ORDER_UNSPEC = 0,
|
||||
BPF_CGROUP_ITER_SELF_ONLY, /* process only a single object. */
|
||||
BPF_CGROUP_ITER_DESCENDANTS_PRE, /* walk descendants in pre-order. */
|
||||
BPF_CGROUP_ITER_DESCENDANTS_POST, /* walk descendants in post-order. */
|
||||
BPF_CGROUP_ITER_ANCESTORS_UP, /* walk ancestors upward. */
|
||||
};
|
||||
|
||||
union bpf_iter_link_info {
|
||||
|
||||
Reference in New Issue
Block a user