Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH bpf-next v11 0/3] bpftool: Add recursive map dumping
@ 2026-11-04 18:54 Tianyi Chen
  2026-11-04 18:54 ` [PATCH bpf-next v11 1/3] bpftool: Reset map info before each query in show and dump loops Tianyi Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tianyi Chen @ 2026-11-04 18:54 UTC (permalink / raw)
  To: bpf
  Cc: Tianyi Chen, qmo, andrii, eddyz87, ihor.solodrai, linux-kselftest,
	shuah, daniel, ast, alexei.starovoitov, skokovmaksimevg

Dump each inner map in the entry that references it. Open it by ID, dump
it and close it immediately; a missing inner map is an error only in
that entry, and shared inner maps are printed in every referring entry.

Changes in v11:
- Drop the queue, deduplication and second pass, as Alexei suggested.
- Drop the ineffective map-info test. Keep the map-info clearing fix
  for bpftool running on kernels without the kernel-side fix.
- Rewrite the recursive tests and drop Quentin's Acked-by on the
  rewritten patch.

Tested in an x86-64 VM, including shared and missing inner maps, BTF,
multiple roots, and the combination with the batch series.

v10: https://lore.kernel.org/r/cover.1793732336.git.hi@tychen.cc

Tianyi Chen (3):
  bpftool: Reset map info before each query in show and dump loops
  bpftool: Add recursive map dumping
  selftests/bpf: Cover recursive bpftool map dumps

 .../bpf/bpftool/Documentation/bpftool-map.rst |   9 +-
 tools/bpf/bpftool/bash-completion/bpftool     |   3 +
 tools/bpf/bpftool/map.c                       |  67 +++-
 .../prog_tests/bpftool_map_dump_recursive.c   | 375 ++++++++++++++++++
 .../bpf/progs/bpftool_map_dump_recursive.c    |  17 +
 5 files changed, 465 insertions(+), 6 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_map_dump_recursive.c
 create mode 100644 tools/testing/selftests/bpf/progs/bpftool_map_dump_recursive.c


base-commit: 8fb43ffc3327d12d57d3fbe6f4820b5a522de0d1
-- 
2.56.0


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

end of thread, other threads:[~2026-11-10 15:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 18:54 [PATCH bpf-next v11 0/3] bpftool: Add recursive map dumping Tianyi Chen
2026-11-04 18:54 ` [PATCH bpf-next v11 1/3] bpftool: Reset map info before each query in show and dump loops Tianyi Chen
2026-11-04 18:54 ` [PATCH bpf-next v11 2/3] bpftool: Add recursive map dumping Tianyi Chen
2026-11-10 15:27   ` Quentin Monnet
2026-11-04 18:54 ` [PATCH bpf-next v11 3/3] selftests/bpf: Cover recursive bpftool map dumps Tianyi Chen
2026-11-04 19:24   ` bot+bpf-ci

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