From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nikita V. Shirokov" Subject: [PATCH v3 bpf-next 0/2] bpf: adding support for mapinmap in libbpf Date: Mon, 19 Nov 2018 22:42:20 -0800 Message-ID: <20181120064222.5606-1-tehnerd@tehnerd.com> Cc: netdev@vger.kernel.org, "Nikita V. Shirokov" To: Alexei Starovoitov , Daniel Borkmann , Jakub Kicinski Return-path: Received: from mail-io1-f45.google.com ([209.85.166.45]:33921 "EHLO mail-io1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbeKUGsf (ORCPT ); Wed, 21 Nov 2018 01:48:35 -0500 Received: by mail-io1-f45.google.com with SMTP id f6so2373064iob.1 for ; Tue, 20 Nov 2018 12:17:40 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: 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 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 | 11 +++- 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, 145 insertions(+), 2 deletions(-) create mode 100644 tools/testing/selftests/bpf/test_mapinmap.c -- 2.15.1