[RFC PATCH bpf-next 3/4] bpftool: Add support for cgroup_task

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 tools/bpf/bpftool/link.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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)
-- 
2.39.3





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux