BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v7 0/2] bpftool: Add recursive map dumping
@ 2026-09-24 16:14 Tianyi Chen
  2026-09-24 16:14 ` [PATCH bpf-next v7 1/2] " Tianyi Chen
  2026-09-24 16:14 ` [PATCH bpf-next v7 2/2] selftests/bpf: Cover recursive bpftool map dumps Tianyi Chen
  0 siblings, 2 replies; 5+ messages in thread
From: Tianyi Chen @ 2026-09-24 16:14 UTC (permalink / raw)
  To: bpf; +Cc: qmo, andrii, eddyz87, ihor.solodrai, linux-kselftest

Add a recursive keyword to map dump to visit referenced inner maps after
the selected roots, with deduplication and bounded descriptor use.

Changes in v7, addressing Quentin's review:
- Replace the global -r/--recursive option with a map dump keyword:
    bpftool map dump id 1337 recursive
  Keep the setting local to each invocation and update help, completion
  and selftests. Reject malformed or repeated trailing arguments.
- Shorten the man page to describe the feature and non-atomic traversal;
  remove detailed output/error-format descriptions and adjust line wrapping.
- Rebase onto current bpf-next, preserving the updated per-CPU dump path.

Validation:
- Rebuilt bpftool and the focused selftest runner; all 13 map-dump subtests
  pass in an x86-64 VM, including the low-descriptor-limit cases.
- Checked pinned maps, per-CPU inner-map plain/JSON output, keyword scope
  across batch commands, and rejection of the removed global options.
- Bash completion checks and test_bpftool_synctypes.py pass.

v6: https://lore.kernel.org/r/20260911051053.283421-1-diannaaav@gmail.com
Review: https://lore.kernel.org/r/44ec5184-5a77-413d-9f42-fd93b0abbf11@kernel.org

Tianyi Chen (2):
  bpftool: Add recursive map dumping
  selftests/bpf: Cover recursive bpftool map dumps

 .../bpf/bpftool/Documentation/bpftool-map.rst |  15 +-
 tools/bpf/bpftool/bash-completion/bpftool     |   3 +
 tools/bpf/bpftool/map.c                       | 143 ++++-
 .../bpf/prog_tests/bpftool_map_dump.c         | 507 ++++++++++++++++++
 4 files changed, 655 insertions(+), 13 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_map_dump.c


base-commit: 740eb74b8d2e3b7850e55b15257c8c0b0fc4a125
-- 
2.55.0


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

end of thread, other threads:[~2026-09-25 17:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-24 16:14 [PATCH bpf-next v7 0/2] bpftool: Add recursive map dumping Tianyi Chen
2026-09-24 16:14 ` [PATCH bpf-next v7 1/2] " Tianyi Chen
2026-09-25 11:26   ` Quentin Monnet
2026-09-25 17:46     ` Tianyi Chen
2026-09-24 16:14 ` [PATCH bpf-next v7 2/2] selftests/bpf: Cover recursive bpftool map dumps Tianyi Chen

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