mbox series

[v2,bpf-next,0/2] bpf: adding support for mapinmap in libbpf

Message ID 20181120051618.3189-1-tehnerd@tehnerd.com
Headers show
Series bpf: adding support for mapinmap in libbpf | expand

Message

Nikita V. Shirokov Nov. 20, 2018, 5:16 a.m. UTC
in this patch series i'm adding a helper for libbpf which would allow
it to load map-in-map(BPF_MAP_TYPE_ARRAY_OF_MAPS and
BPF_MAP_TYPE_HASH_OF_MAPS).
first patch contains new helper + explains proposed workflow
second patch contains tests which also could be used as example of
usage

v1->v2:
 - addressing nits
 - removing const identifier from fd in new helper
 - starting to check return val for bpf_map_update_elem

Nikita V. Shirokov (2):
  bpf: adding support for map in map in libbpf
  bpf: adding tests for mapinmap helpber in libbpf

 tools/lib/bpf/libbpf.c                      |  7 +++
 tools/lib/bpf/libbpf.h                      |  2 +
 tools/testing/selftests/bpf/Makefile        |  3 +-
 tools/testing/selftests/bpf/test_mapinmap.c | 49 +++++++++++++++++
 tools/testing/selftests/bpf/test_maps.c     | 82 +++++++++++++++++++++++++++++
 5 files changed, 142 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/bpf/test_mapinmap.c

Comments

Y Song Nov. 20, 2018, 7:14 a.m. UTC | #1
On Mon, Nov 19, 2018 at 9:40 PM Nikita V. Shirokov <tehnerd@tehnerd.com> wrote:
>
> in this patch series i'm adding a helper for libbpf which would allow
> it to load map-in-map(BPF_MAP_TYPE_ARRAY_OF_MAPS and
> BPF_MAP_TYPE_HASH_OF_MAPS).
> first patch contains new helper + explains proposed workflow
> second patch contains tests which also could be used as example of
> usage
>
> v1->v2:
>  - addressing nits
>  - removing const identifier from fd in new helper
>  - starting to check return val for bpf_map_update_elem
>
> Nikita V. Shirokov (2):
>   bpf: adding support for map in map in libbpf
>   bpf: adding tests for mapinmap helpber in libbpf

For the whole series.
Acked-by: Yonghong Song <yhs@fb.com>

>
>  tools/lib/bpf/libbpf.c                      |  7 +++
>  tools/lib/bpf/libbpf.h                      |  2 +
>  tools/testing/selftests/bpf/Makefile        |  3 +-
>  tools/testing/selftests/bpf/test_mapinmap.c | 49 +++++++++++++++++
>  tools/testing/selftests/bpf/test_maps.c     | 82 +++++++++++++++++++++++++++++
>  5 files changed, 142 insertions(+), 1 deletion(-)
>  create mode 100644 tools/testing/selftests/bpf/test_mapinmap.c
>
> --
> 2.15.1
>