linux_dsm_epyc7002/tools/bpf/bpftool
Andrii Nakryiko c5481f9a95 bpftool: Add bpf_link show and pin support
Add `bpftool link show` and `bpftool link pin` commands.

Example plain output for `link show` (with showing pinned paths):

[vmuser@archvm bpf]$ sudo ~/local/linux/tools/bpf/bpftool/bpftool -f link
1: tracing  prog 12
        prog_type tracing  attach_type fentry
        pinned /sys/fs/bpf/my_test_link
        pinned /sys/fs/bpf/my_test_link2
2: tracing  prog 13
        prog_type tracing  attach_type fentry
3: tracing  prog 14
        prog_type tracing  attach_type fentry
4: tracing  prog 15
        prog_type tracing  attach_type fentry
5: tracing  prog 16
        prog_type tracing  attach_type fentry
6: tracing  prog 17
        prog_type tracing  attach_type fentry
7: raw_tracepoint  prog 21
        tp 'sys_enter'
8: cgroup  prog 25
        cgroup_id 584  attach_type egress
9: cgroup  prog 25
        cgroup_id 599  attach_type egress
10: cgroup  prog 25
        cgroup_id 614  attach_type egress
11: cgroup  prog 25
        cgroup_id 629  attach_type egress

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20200429001614.1544-9-andriin@fb.com
2020-04-28 17:27:08 -07:00
..
bash-completion bpftool: Add struct_ops support 2020-03-20 15:51:35 +01:00
Documentation bpftool: Add struct_ops support 2020-03-20 15:51:35 +01:00
skeleton bpftool: Use linux/types.h from source tree for profiler build 2020-03-12 16:22:41 +01:00
.gitignore SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
btf_dumper.c bpftool: Translate prog_id to its bpf prog_name 2020-03-20 15:51:35 +01:00
btf.c tools/bpf/bpftool: Remove duplicate headers 2020-04-26 08:40:01 -07:00
cfg.c tools: bpftool: teach cfg code about JMP32 2019-01-26 13:33:01 -08:00
cfg.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00
cgroup.c bpftool: Expose attach_type-to-string array to non-cgroup code 2020-04-28 17:27:08 -07:00
common.c bpftool: Add bpf_link show and pin support 2020-04-28 17:27:08 -07:00
feature.c bpftool: Make probes which emit dmesg warnings optional 2020-02-26 18:34:34 +01:00
gen.c tools/bpf/bpftool: Remove duplicate headers 2020-04-26 08:40:01 -07:00
jit_disasm.c tools/bpf/bpftool: Remove duplicate headers 2020-04-26 08:40:01 -07:00
json_writer.c tools: bpftool: move "__printf()" attributes to header file 2019-08-15 22:06:46 -07:00
json_writer.h tools: bpftool: move "__printf()" attributes to header file 2019-08-15 22:06:46 -07:00
link.c bpftool: Add bpf_link show and pin support 2020-04-28 17:27:08 -07:00
main.c bpftool: Add bpf_link show and pin support 2020-04-28 17:27:08 -07:00
main.h bpftool: Add bpf_link show and pin support 2020-04-28 17:27:08 -07:00
Makefile tools/bpf: Move linux/types.h for selftests and bpftool 2020-03-13 20:56:34 +01:00
map_perf_ring.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
map.c tools: bpftool: Allow all prog/map handles for pinning objects 2020-03-13 00:24:08 +01:00
net.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
netlink_dumper.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
netlink_dumper.h tools: bpftool: dual license all files 2018-12-13 12:08:44 +01:00
perf.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
prog.c tools: bpftool: Restore message on failure to guess program type 2020-03-13 12:49:51 -07:00
struct_ops.c bpftool: Respect the -d option in struct_ops cmd 2020-04-24 17:40:54 -07:00
tracelog.c tools: bpftool: add an option to prevent auto-mount of bpffs, tracefs 2018-12-18 14:47:17 +01:00
xlated_dumper.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
xlated_dumper.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00