lkml.org 
[lkml]   [2017]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH net-next 0/5] bpftool: cgroup bpf operations
Date
This patchset adds basic cgroup bpf operations to bpftool.

Right now there is no convenient way to perform these operations.
The /samples/bpf/load_sock_ops.c implements attach/detacg operations,
but only for BPF_CGROUP_SOCK_OPS programs. Bps (part of bcc) implements
bpf introspection, but lacks any cgroup-related specific.

I find having a tool to perform these basic operations in the kernel tree
very useful, as it can be used in the corresponding bpf documentation
without creating additional dependencies. And bpftool seems to be
a right tool to extend with such functionality.

Roman Gushchin (5):
libbpf: add ability to guess program type based on section name
libbpf: prefer global symbols as bpf program name source
bpftool: implement cgattach command
bpftool: implement cgdetach command
bpftool: implement cglist command

tools/bpf/bpftool/main.c | 209 ++++++++++++++++++++++++++++++++++++++++++++++-
tools/lib/bpf/libbpf.c | 49 +++++++++++
2 files changed, 257 insertions(+), 1 deletion(-)

--
2.14.3

\
 
 \ /
  Last update: 2017-11-30 14:46    [W:1.220 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site