linux-stable/tools/lib
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
..
api docs: Fix some broken references 2018-06-15 18:10:01 -03:00
bpf tools: libbpf: allow map reuse 2018-07-11 22:13:34 +02:00
lockdep License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
subcmd perf tools: Add '\n' at the end of parse-options error messages 2018-04-18 15:35:51 -03:00
symbol tools lib symbols: Introduce kallsyms__is_function() 2018-04-26 13:47:14 -03:00
traceevent tools lib traceevent: Fix get_field_str() for dynamic strings 2018-01-17 10:23:21 -03:00
bitmap.c tools lib: Add bitmap_and function 2016-08-02 16:33:27 -03:00
find_bit.c lib: optimize cpumask_next_and() 2018-02-06 18:32:44 -08:00
hweight.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rbtree.c tools: Copy lib/rbtree.c to tools/lib/ 2015-07-05 22:48:21 -03:00
str_error_r.c objtool, perf: Fix GCC 8 -Wrestrict error 2018-03-19 13:51:54 -03:00
string.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vsprintf.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00