Message ID | 20230716121046.17110-4-laoar.shao@gmail.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | BPF |
Headers | show |
Series | bpf: Introduce cgroup_task iter | expand |
diff --git a/tools/bpf/bpftool/link.c b/tools/bpf/bpftool/link.c index 65a168df63bc..efbdefdb1b18 100644 --- a/tools/bpf/bpftool/link.c +++ b/tools/bpf/bpftool/link.c @@ -158,7 +158,8 @@ static bool is_iter_map_target(const char *target_name) static bool is_iter_cgroup_target(const char *target_name) { - return strcmp(target_name, "cgroup") == 0; + return strcmp(target_name, "cgroup") == 0 || + strcmp(target_name, "cgroup_task") == 0; } static const char *cgroup_order_string(__u32 order)
we need to make corresponding changes to the bpftool to support cgroup_task iter. The result: $ bpftool link show 3: iter prog 15 target_name cgroup_task cgroup_id 7427 order self_only Signed-off-by: Yafang Shao <laoar.shao@gmail.com> --- tools/bpf/bpftool/link.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)