Skip to content

bpf: allow zero-initialising hash map seed

Lorenz Bauer linux-api netdev 3 versions – Applied

Status from this message: Applied to bpf-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 3 repliesApplied
  2. v23 patches 6 repliesSuperseded
  3. v13 patches 10 repliesSuperseded

Changes in v3 from the cover letter

* Change ordering of BPF_F_ZERO_SEED in linux/bpf.h

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4bpf: allow zero-initializing hash map seedinclude/uapi/linux/bpf.h kernel/bpf/hashtab.c+14 -20 replies
2/4bpf: move BPF_F_QUERY_EFFECTIVE after map flagsinclude/uapi/linux/bpf.h+3 -30 replies
3/4tools: sync linux/bpf.htools/include/uapi/linux/bpf.h+10 -30 replies
4/4tools: add selftest for BPF_F_ZERO_SEEDtools/testing/selftests/bpf/test_maps.c+57 -110 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSong Liu
SeriesA-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/4] bpf: allow zero-initialising hash map seed

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(-)
Signature · 1 line
2.17.1