All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tianyi Chen <hi@tychen.cc>
To: bpf@vger.kernel.org
Cc: Tianyi Chen <hi@tychen.cc>,
	ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	eddyz87@gmail.com, memxor@gmail.com, shuah@kernel.org,
	linux-kselftest@vger.kernel.org, qmo@kernel.org,
	ihor.solodrai@linux.dev
Subject: [PATCH bpf-next v10 0/2] bpftool: Use batch lookups for map dumps
Date: Wed, 11 Nov 2026 16:18:54 +0900	[thread overview]
Message-ID: <cover.1794380384.git.hi@tychen.cc> (raw)

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


             reply	other threads:[~2026-11-11  7:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  7:18 Tianyi Chen [this message]
2026-11-11  7:18 ` [PATCH bpf-next v10 1/2] bpftool: Use batch lookups for map dumps 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

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=cover.1794380384.git.hi@tychen.cc \
    --to=hi@tychen.cc \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=memxor@gmail.com \
    --cc=qmo@kernel.org \
    --cc=shuah@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.