From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lorenz Bauer Subject: [PATCH 0/3] bpf: allow zero-initialising hash map seed Date: Mon, 1 Oct 2018 11:45:06 +0100 Message-ID: <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-f67.google.com ([209.85.221.67]:38181 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728891AbeJARYT (ORCPT ); Mon, 1 Oct 2018 13:24:19 -0400 Received: by mail-wr1-f67.google.com with SMTP id a13-v6so2662252wrt.5 for ; Mon, 01 Oct 2018 03:47:07 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: This patch set adds a new flag BPF_F_ZERO_SEED, which allows forcing the seed used by hash maps to zero. This makes it possible to write deterministic tests. Based on an off-list conversation with Alexei Starovoitov and Daniel Borkmann. 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 | 8 ++- tools/include/uapi/linux/bpf.h | 2 + tools/testing/selftests/bpf/test_maps.c | 67 +++++++++++++++++++++---- 4 files changed, 66 insertions(+), 13 deletions(-) -- 2.17.1