]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: complete list of strings for guessing program type
authorQuentin Monnet <quentin.monnet@netronome.com>
Thu, 8 Feb 2018 04:27:13 +0000 (20:27 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 8 Feb 2018 10:59:50 +0000 (11:59 +0100)
commitb042c1e0f7126fb65a6ca8c590ffacd2c07df78d
tree8f140f765f8f637fed5fea1573b208b0563c9fe6
parentca7c62e5c5449eecad67c07665c035564d426c29
libbpf: complete list of strings for guessing program type

It seems that the type guessing feature for libbpf, based on the name of
the ELF section the program is located in, was inspired from
samples/bpf/prog_load.c, which was not used by any sample for loading
programs of certain types such as TC actions and classifiers, or
LWT-related types. As a consequence, libbpf is not able to guess the
type of such programs and to load them automatically if type is not
provided to the `bpf_load_prog()` function.

Add ELF section names associated to those eBPF program types so that
they can be loaded with e.g. bpftool as well.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c