On 12/8/17 4:46 PM, Jakub Kicinski wrote:
>> +argc -= 2;
>> +argv = &argv[2];
>> +prog_fd = prog_parse_fd(&argc, &argv);
>> +if (prog_fd < 0)
>> +goto exit_cgroup;
>> +
>> +for (i = 0; i < argc; i++) {
>> +if (strcmp(argv[i], "allow_multi") == 0) {
>> +
On Fri, 8 Dec 2017 14:52:36 +, Roman Gushchin wrote:
> +static int list_attached_bpf_progs(int cgroup_fd, enum bpf_attach_type type)
> +{
> + __u32 prog_ids[1024] = {0};
> + char *attach_flags_str;
> + __u32 prog_cnt, iter;
> + __u32 attach_flags;
> + char buf[16];
> + i
This patch adds basic cgroup bpf operations to bpftool:
cgroup list, attach and detach commands.
Usage is described in the corresponding man pages,
and examples are provided.
Syntax:
$ bpftool cgroup list CGROUP
$ bpftool cgroup attach CGROUP ATTACH_TYPE PROG [ATTACH_FLAGS]
$ bpftool cgroup detac