BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v10 0/2] bpftool: Use batch lookups for map dumps
@ 2026-11-11  7:18 Tianyi Chen
  2026-11-11  7:18 ` [PATCH bpf-next v10 1/2] " Tianyi Chen
  2026-11-11  7:18 ` [PATCH bpf-next v10 2/2] selftests/bpf: Check bpftool batch " Tianyi Chen
  0 siblings, 2 replies; 4+ messages in thread
From: Tianyi Chen @ 2026-11-11  7:18 UTC (permalink / raw)
  To: bpf
  Cc: Tianyi Chen, ast, daniel, andrii, eddyz87, memxor, shuah,
	linux-kselftest, qmo, ihor.solodrai

Use bounded batch lookups for map dumps, falling back to individual
lookups after the last printed key on a batch error.

RHASH concurrent-delete correctness requires "bpf: Fix RHASH batch
cursor loss" v2 [1]. Please take that kernel fix first.

Changes in v10:
- Document the non-zero key/value size precondition.
- Rename the tests to bpftool_map_dump_batch, drop duplicate LRU cases
  and use small per-CPU maps. Reserve JSON checks for representative
  raw, BTF, per-CPU and multi-batch paths.
- Carry Quentin's Acked-by tags.

The 14 batch subtests pass in x86-64 KVM. Combined with recursive v12,
all 33 dump/access subtests pass with both 2 and 128 possible CPUs
(2 CPUs online), without skips.

[1] https://lore.kernel.org/r/cover.1794379108.git.hi@tychen.cc

v9: https://lore.kernel.org/r/cover.1793821981.git.hi@tychen.cc

Tianyi Chen (2):
  bpftool: Use batch lookups for map dumps
  selftests/bpf: Check bpftool batch map dumps

 tools/bpf/bpftool/map.c                       |  98 ++++++--
 .../bpf/prog_tests/bpftool_map_dump_batch.c   | 229 ++++++++++++++++++
 .../bpf/progs/bpftool_map_dump_batch.c        |  42 ++++
 3 files changed, 354 insertions(+), 15 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_map_dump_batch.c
 create mode 100644 tools/testing/selftests/bpf/progs/bpftool_map_dump_batch.c


base-commit: 0fb18ce8a2e9de830433923cf65838933d615359
-- 
2.56.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-11  7:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11  7:18 [PATCH bpf-next v10 0/2] bpftool: Use batch lookups for map dumps Tianyi Chen
2026-11-11  7:18 ` [PATCH bpf-next v10 1/2] " Tianyi Chen
2026-11-11  7:38   ` sashiko-bot
2026-11-11  7:18 ` [PATCH bpf-next v10 2/2] selftests/bpf: Check bpftool batch " Tianyi Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox