linux_dsm_epyc7002/tools/lib/bpf
Jakub Kicinski 26736eb9a4 tools: libbpf: allow map reuse
More advanced applications may want to only replace programs without
destroying associated maps.  Allow libbpf users to achieve that.
Instead of always creating all of the maps at load time, expose to
users an API to reconstruct the map object from already existing
map.

The map parameters are read from the kernel and replace the parameters
of the ELF map.  libbpf does not restrict the map replacement, i.e.
the reused map does not have to be compatible with the ELF map
definition.  We relay on the verifier for checking the compatibility
between maps and programs.  The ELF map definition is completely
overwritten by the information read from the kernel, to make sure
libbpf's view of map object corresponds to the actual map.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-07-11 22:13:34 +02:00
..
.gitignore tools lib bpf: Change FEATURE-DUMP to FEATURE-DUMP.libbpf 2015-11-05 12:47:51 -03:00
bpf.c tools/bpf: sync kernel header bpf.h and add bpf_task_fd_query in libbpf 2018-05-24 18:18:19 -07:00
bpf.h tools/bpf: sync kernel header bpf.h and add bpf_task_fd_query in libbpf 2018-05-24 18:18:19 -07:00
btf.c bpf: btf: Add tests for the btf uapi changes 2018-05-23 12:03:32 +02:00
btf.h bpf: btf: Add BTF support to libbpf 2018-04-19 21:46:25 +02:00
Build tools: libbpf: move library error code into a separate file 2018-07-11 22:13:34 +02:00
libbpf_errno.c tools: libbpf: move library error code into a separate file 2018-07-11 22:13:34 +02:00
libbpf.c tools: libbpf: allow map reuse 2018-07-11 22:13:34 +02:00
libbpf.h tools: libbpf: allow map reuse 2018-07-11 22:13:34 +02:00
Makefile tools: bpf: make use of reallocarray 2018-07-11 22:13:34 +02:00
nlattr.c libbpf: add error reporting in XDP 2018-02-02 17:53:48 -08:00
nlattr.h libbpf: add error reporting in XDP 2018-02-02 17:53:48 -08:00