From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lorenz Bauer Subject: [PATCH v3 0/4] bpf: allow zero-initialising hash map seed Date: Fri, 16 Nov 2018 11:41:07 +0000 Message-ID: <20181116114111.31177-1-lmb@cloudflare.com> References: <20181001104509.24211-1-lmb@cloudflare.com> Cc: netdev@vger.kernel.org, linux-api@vger.kernel.org, songliubraving@fb.com, Lorenz Bauer To: ast@kernel.org, daniel@iogearbox.net Return-path: Received: from mail-wm1-f67.google.com ([209.85.128.67]:35898 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727579AbeKPVxl (ORCPT ); Fri, 16 Nov 2018 16:53:41 -0500 Received: by mail-wm1-f67.google.com with SMTP id s11so11512845wmh.1 for ; Fri, 16 Nov 2018 03:41:40 -0800 (PST) In-Reply-To: <20181001104509.24211-1-lmb@cloudflare.com> Sender: netdev-owner@vger.kernel.org List-ID: Allow forcing the seed of a hash table to zero, for deterministic execution during benchmarking and testing. Changes from v2: * Change ordering of BPF_F_ZERO_SEED in linux/bpf.h Comments adressed from v1: * Add comment to discourage production use to linux/bpf.h * Require CAP_SYS_ADMIN Lorenz Bauer (4): bpf: allow zero-initializing hash map seed bpf: move BPF_F_QUERY_EFFECTIVE after map flags tools: sync linux/bpf.h tools: add selftest for BPF_F_ZERO_SEED include/uapi/linux/bpf.h | 9 ++-- kernel/bpf/hashtab.c | 13 ++++- tools/include/uapi/linux/bpf.h | 13 +++-- tools/testing/selftests/bpf/test_maps.c | 68 +++++++++++++++++++++---- 4 files changed, 84 insertions(+), 19 deletions(-) -- 2.17.1