Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH bpf-next v8 0/2] bpftool: Use batch lookups for map dumps
@ 2026-11-04 18:55 Tianyi Chen
  2026-11-04 18:55 ` [PATCH bpf-next v8 1/2] " Tianyi Chen
  2026-11-04 18:55 ` [PATCH bpf-next v8 2/2] selftests/bpf: Check bpftool batch " Tianyi Chen
  0 siblings, 2 replies; 5+ messages in thread
From: Tianyi Chen @ 2026-11-04 18:55 UTC (permalink / raw)
  To: bpf
  Cc: Tianyi Chen, qmo, andrii, eddyz87, ihor.solodrai, linux-kselftest,
	shuah, daniel, ast, alexei.starovoitov

Use batch lookups for map dumps and continue with individual lookups
from the last printed key after any batch error.

Changes in v8:
- Follow Alexei's simpler approach: use a 1 MiB buffer budget, remove
  buffer growth and error classes, and try batching for all map types.
- Count and fail bpftool's lookups in the selftest. Check plain and JSON
  output, including failures before and after the first batch.
- Drop Quentin's Acked-by on the rewritten patch.

Tested in an x86-64 VM: all 16 batch subtests pass; unpatched bpftool
fails all 16. The combination with the recursive series also passes.

v7: https://lore.kernel.org/r/cover.1793732386.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                       |  97 ++++++--
 .../bpf/prog_tests/bpftool_map_batch.c        | 228 ++++++++++++++++++
 .../selftests/bpf/progs/bpftool_map_batch.c   |  42 ++++
 3 files changed, 352 insertions(+), 15 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_map_batch.c
 create mode 100644 tools/testing/selftests/bpf/progs/bpftool_map_batch.c


base-commit: 8fb43ffc3327d12d57d3fbe6f4820b5a522de0d1
-- 
2.56.0


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

end of thread, other threads:[~2026-11-04 19:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 18:55 [PATCH bpf-next v8 0/2] bpftool: Use batch lookups for map dumps Tianyi Chen
2026-11-04 18:55 ` [PATCH bpf-next v8 1/2] " Tianyi Chen
2026-11-04 18:55 ` [PATCH bpf-next v8 2/2] selftests/bpf: Check bpftool batch " Tianyi Chen
2026-11-04 19:24   ` bot+bpf-ci
2026-11-04 19:54     ` Tianyi Chen

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