From: "Nikita V. Shirokov" <tehnerd@tehnerd.com>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: netdev@vger.kernel.org, "Nikita V. Shirokov" <tehnerd@tehnerd.com>
Subject: [PATCH v4 bpf-next 0/2] bpf: adding support for mapinmap in libbpf
Date: Tue, 20 Nov 2018 17:33:42 -0800 [thread overview]
Message-ID: <20181121013344.11006-1-tehnerd@tehnerd.com> (raw)
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
v3->v4:
- renamed helper to set_inner_map_fd
- now we set this value only if it haven't
been set before and only for (array|hash) of maps
v2->v3:
- fixing typo in patch description
- initializing inner_map_fd to -1 by default
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 | 33 +++++++++---
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, 162 insertions(+), 7 deletions(-)
create mode 100644 tools/testing/selftests/bpf/test_mapinmap.c
--
2.15.1
next reply other threads:[~2018-11-21 12:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 1:33 Nikita V. Shirokov [this message]
2018-11-21 1:33 ` [PATCH v4 bpf-next 1/2] bpf: adding support for map in map in libbpf Nikita V. Shirokov
2018-11-21 2:11 ` Alexei Starovoitov
2018-11-21 1:33 ` [PATCH v4 bpf-next 2/2] bpf: adding tests for mapinmap helpber " Nikita V. Shirokov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181121013344.11006-1-tehnerd@tehnerd.com \
--to=tehnerd@tehnerd.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).