Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Tianyi Chen <diannaaav@gmail.com>
To: qmo@kernel.org, bpf@vger.kernel.org
Cc: andrii@kernel.org, eddyz87@gmail.com, ihor.solodrai@linux.dev,
	linux-kselftest@vger.kernel.org
Subject: [PATCH bpf-next v3 0/2] bpftool: Batch bounded hash map dumps
Date: Fri, 11 Sep 2026 10:51:28 +0800	[thread overview]
Message-ID: <20260911025130.191011-1-diannaaav@gmail.com> (raw)

Use lookup batches for ordinary hash maps whose maximum key/value
storage fits within 4 MiB. The second patch checks complete output around
the batch boundary, short keys, odd-sized values and BTF formatting.

Changes in v3:
- Explain the batching benefit, conservative memory bound, and why
  ineligible maps retain the existing traversal in the commit message.
- Rebase onto current bpf-next and use Assisted-by: LLM.

The v2 implementation and tests are unchanged. Fatal batch diagnostics
remain on stderr so JSON element arrays contain only map entries.

v2: https://lore.kernel.org/r/178874362960.1415955.9584865244247659247.batch-v2-0@tychen.cc
Request: https://github.com/libbpf/bpftool/issues/63

The previous version's CI PR expired after repeated "Patch is empty"
reports. The revised series applies cleanly to the current tree and is
sent as a new thread using git format-patch and git send-email.

Validation:
- Built bpftool and its manual pages, and built the focused selftest
  runner with LLVM 20.
- All 11 bpftool_map_batch subtests passed with no skips or failures
  in an x86-64 KVM guest running Linux 7.3.0-rc2 from current bpf/master.
- The four bpftool series were tested together: all 69 subtests passed.
  The cpumask suite (36 subtests) and test_maps also passed with no skips.
- Bash syntax and the existing bpftool synchronization checks passed.

This was a focused run; unrelated selftests requiring unavailable kernel
features were excluded from the build with PERMISSIVE=1.

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

 tools/bpf/bpftool/map.c                       | 116 ++++++++++-
 .../bpf/prog_tests/bpftool_map_batch.c        | 187 ++++++++++++++++++
 2 files changed, 295 insertions(+), 8 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_map_batch.c


base-commit: af0b84a9215d951d16f26b7ee34353b970cf5d4e
-- 
2.55.0


             reply	other threads:[~2026-09-11  2:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11  2:51 Tianyi Chen [this message]
2026-09-11  2:51 ` [PATCH bpf-next v3 1/2] bpftool: Use batch lookups for bounded hash map dumps Tianyi Chen
2026-09-11  3:37   ` bot+bpf-ci
2026-09-11  2:51 ` [PATCH bpf-next v3 2/2] selftests/bpf: Check bpftool batch map dump contents Tianyi Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260911025130.191011-1-diannaaav@gmail.com \
    --to=diannaaav@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=eddyz87@gmail.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=qmo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox