Skip to content

libbpf: add an option to reuse maps when loading a program

Anton Protopopov bpf lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf, libbpf: add a new API bpf_object__reuse_maps()tools/lib/bpf/libbpf.c tools/lib/bpf/libbpf.h tools/lib/bpf/libbpf.map+37 -06 replies
2/2bpf, libbpf: add an option to reuse existing maps in bpf_prog_load_xattrtools/lib/bpf/libbpf.c tools/lib/bpf/libbpf.h+9 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/2] libbpf: add an option to reuse maps when loading a program

The following two patches add an option for users to reuse existing maps when loading a program using the bpf_prog_load_xattr function. A user can specify a directory containing pinned maps inside the bpf_prog_load_attr structure, and in this case the bpf_prog_load_xattr function will replace (bpf_map__reuse_fd) all maps defined in the object with file descriptors obtained from corresponding entries from the specified directory.

Anton Protopopov (2):
bpf, libbpf: add a new API bpf_object__reuse_maps()
bpf, libbpf: add an option to reuse existing maps in bpf_prog_load_xattr

 tools/lib/bpf/libbpf.c   | 42 ++++++++++++++++++++++++++++++++++++++++
 tools/lib/bpf/libbpf.h   |  3 +++
 tools/lib/bpf/libbpf.map |  1 +
 3 files changed, 46 insertions(+)

--
2.19.1