Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751478AbaKDCye (ORCPT ); Mon, 3 Nov 2014 21:54:34 -0500 Received: from mail-pd0-f180.google.com ([209.85.192.180]:46542 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbaKDCyc (ORCPT ); Mon, 3 Nov 2014 21:54:32 -0500 From: Alexei Starovoitov To: "David S. Miller" Cc: Ingo Molnar , Andy Lutomirski , Daniel Borkmann , Hannes Frederic Sowa , Eric Dumazet , linux-api@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 0/7] implementation of eBPF maps Date: Mon, 3 Nov 2014 18:54:09 -0800 Message-Id: <1415069656-14138-1-git-send-email-ast@plumgrid.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, this set of patches adds implementation of HASH and ARRAY types of eBPF maps which were described in manpage in commit b4fc1a460f30("Merge branch 'bpf-next'") The difference vs previous version of these patches from August: - added 'flags' attribute to BPF_MAP_UPDATE_ELEM - in HASH type implementation removed per-map kmem_cache. I was doing kmem_cache_create() for every map to enable selective slub debugging to check for overflows and leaks. Now it's not needed, so just use normal kmalloc() for map elements. - added ARRAY type which was mentioned in manpage, but wasn't public yet - added map testsuite and removed temporary bits from test_stubs Note, eBPF programs cannot be attached to events yet. It will come in the next set. Alexei Starovoitov (7): bpf: add 'flags' attribute to BPF_MAP_UPDATE_ELEM command bpf: add hashtable type of eBPF maps bpf: add array type of eBPF maps bpf: fix BPF_MAP_LOOKUP_ELEM command return code bpf: add a testsuite for eBPF maps bpf: allow eBPF programs to use maps bpf: remove test map scaffolding and user proper types include/linux/bpf.h | 7 +- include/uapi/linux/bpf.h | 15 +- kernel/bpf/Makefile | 2 +- kernel/bpf/arraymap.c | 150 ++++++++++++++++++ kernel/bpf/hashtab.c | 362 +++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/helpers.c | 88 +++++++++++ kernel/bpf/syscall.c | 6 +- kernel/bpf/test_stub.c | 56 ++----- samples/bpf/Makefile | 3 +- samples/bpf/libbpf.c | 3 +- samples/bpf/libbpf.h | 2 +- samples/bpf/test_maps.c | 287 ++++++++++++++++++++++++++++++++++ samples/bpf/test_verifier.c | 14 +- 13 files changed, 932 insertions(+), 63 deletions(-) create mode 100644 kernel/bpf/arraymap.c create mode 100644 kernel/bpf/hashtab.c create mode 100644 kernel/bpf/helpers.c create mode 100644 samples/bpf/test_maps.c -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/