summaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.c
diff options
context:
space:
mode:
authorWang Nan2015-07-01 04:14:03 +0200
committerArnaldo Carvalho de Melo2015-08-07 15:16:58 +0200
commite3ed2fef22b694cf07b06abaa6481a9e6f868e1f (patch)
tree8bedf2afaa8104c26b13dc2f75034a9e5aea55a1 /tools/lib/bpf/libbpf.c
parentbpf tools: Record map accessing instructions for each program (diff)
downloadkernel-qcow2-linux-e3ed2fef22b694cf07b06abaa6481a9e6f868e1f.tar.gz
kernel-qcow2-linux-e3ed2fef22b694cf07b06abaa6481a9e6f868e1f.tar.xz
kernel-qcow2-linux-e3ed2fef22b694cf07b06abaa6481a9e6f868e1f.zip
bpf tools: Add bpf.c/h for common bpf operations
This patch introduces bpf.c and bpf.h, which hold common functions issuing bpf syscall. The goal of these two files is to hide syscall completely from user. Note that bpf.c and bpf.h deal with kernel interface only. Things like structure of 'map' section in the ELF object is not cared by of bpf.[ch]. We first introduce bpf_create_map(). Note that, since functions in bpf.[ch] are wrapper of sys_bpf, they don't use OO style naming. Signed-off-by: Wang Nan <wangnan0@huawei.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: David Ahern <dsahern@gmail.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kaixu Xia <xiakaixu@huawei.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1435716878-189507-16-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
0 files changed, 0 insertions, 0 deletions