• W
    bpf tools: Add bpf.c/h for common bpf operations · e3ed2fef
    Wang Nan 提交于
    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: NWang Nan <wangnan0@huawei.com>
    Acked-by: NAlexei 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.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    e3ed2fef
bpf.c 1.1 KB