• Andrey Ignatov's avatar
    libbpf: Support expected_attach_type at prog load · d7be143b
    Andrey Ignatov authored
    Support setting `expected_attach_type` at prog load time in both
    `bpf/bpf.h` and `bpf/libbpf.h`.
    
    Since both headers already have API to load programs, new functions are
    added not to break backward compatibility for existing ones:
    * `bpf_load_program_xattr()` is added to `bpf/bpf.h`;
    * `bpf_prog_load_xattr()` is added to `bpf/libbpf.h`.
    
    Both new functions accept structures, `struct bpf_load_program_attr` and
    `struct bpf_prog_load_attr` correspondingly, where new fields can be
    added in the future w/o changing the API.
    
    Standard `_xattr` suffix is used to name the new API functions.
    
    Since `bpf_load_program_name()` is not used as heavily as
    `bpf_load_program()`, it was removed in favor of more generic
    `bpf_load_program_xattr()`.
    Signed-off-by: default avatarAndrey Ignatov <rdna@fb.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    d7be143b
Name
Last commit
Last update
..
api Loading commit data...
bpf Loading commit data...
lockdep Loading commit data...
subcmd Loading commit data...
symbol Loading commit data...
traceevent Loading commit data...
bitmap.c Loading commit data...
find_bit.c Loading commit data...
hweight.c Loading commit data...
rbtree.c Loading commit data...
str_error_r.c Loading commit data...
string.c Loading commit data...
vsprintf.c Loading commit data...