From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lorenz Bauer Subject: [PATCH v2 0/3] bpf: allow zero-initialising hash map seed Date: Mon, 8 Oct 2018 11:32:18 +0100 Message-ID: <20181008103221.13468-1-lmb@cloudflare.com> References: <20181001104509.24211-1-lmb@cloudflare.com> Cc: netdev@vger.kernel.org, linux-api@vger.kernel.org, Lorenz Bauer To: ast@kernel.org, daniel@iogearbox.net Return-path: Received: from mail-wr1-f65.google.com ([209.85.221.65]:41678 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbeJHRoE (ORCPT ); Mon, 8 Oct 2018 13:44:04 -0400 Received: by mail-wr1-f65.google.com with SMTP id x12-v6so20215108wru.8 for ; Mon, 08 Oct 2018 03:33:01 -0700 (PDT) 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. Comments adressed from v1: * Add comment to discourage production use to linux/bpf.h * Require CAP_SYS_ADMIN Lorenz Bauer (3): bpf: allow zero-initializing hash map seed tools: sync linux/bpf.h tools: add selftest for BPF_F_ZERO_SEED include/uapi/linux/bpf.h | 2 + kernel/bpf/hashtab.c | 13 ++++- tools/include/uapi/linux/bpf.h | 2 + tools/testing/selftests/bpf/test_maps.c | 68 +++++++++++++++++++++---- 4 files changed, 72 insertions(+), 13 deletions(-) -- 2.17.1