From: Yafang Shao <laoar.shao@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
andrii@kernel.org, martin.lau@linux.dev, song@kernel.org,
yhs@fb.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org, quentin@isovalent.com
Cc: bpf@vger.kernel.org, Yafang Shao <laoar.shao@gmail.com>
Subject: [RFC PATCH bpf-next 3/4] bpftool: Add support for cgroup_task
Date: Sun, 16 Jul 2023 12:10:45 +0000 [thread overview]
Message-ID: <20230716121046.17110-4-laoar.shao@gmail.com> (raw)
In-Reply-To: <20230716121046.17110-1-laoar.shao@gmail.com>
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(-)
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
next prev parent reply other threads:[~2023-07-16 12:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-16 12:10 [RFC PATCH bpf-next 0/4] bpf: Introduce cgroup_task iter Yafang Shao
2023-07-16 12:10 ` [RFC PATCH bpf-next 1/4] bpf: Add __bpf_iter_attach_cgroup() Yafang Shao
2023-07-16 12:10 ` [RFC PATCH bpf-next 2/4] bpf: Add cgroup_task iter Yafang Shao
2023-07-16 12:10 ` Yafang Shao [this message]
2023-07-16 12:10 ` [RFC PATCH bpf-next 4/4] selftests/bpf: Add selftest for " Yafang Shao
2023-07-27 14:29 ` [RFC PATCH bpf-next 0/4] bpf: Introduce " Yafang Shao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230716121046.17110-4-laoar.shao@gmail.com \
--to=laoar.shao@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=quentin@isovalent.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).