linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v5 0/2] bpftool: Support symbolic map creation flags
@ 2026-09-11  3:46 Tianyi Chen
  2026-09-11  3:46 ` [PATCH bpf-next v5 1/2] bpftool: Accept " Tianyi Chen
  2026-09-11  3:46 ` [PATCH bpf-next v5 2/2] selftests/bpf: Cover symbolic bpftool " Tianyi Chen
  0 siblings, 2 replies; 3+ messages in thread
From: Tianyi Chen @ 2026-09-11  3:46 UTC (permalink / raw)
  To: qmo, bpf; +Cc: andrii, eddyz87, ihor.solodrai, linux-kselftest

Add comma-separated BPF_F_* names to map create flags, with matching
documentation, completion and selftests.

Changes in v5:
- State explicitly that the old numeric parser accepted empty input as
  zero and could truncate or wrap out-of-range values. Rejecting those
  inputs is an intentional compatibility change already present in v4.
- Explain why BPF_F_PATH_FD is excluded from map creation flags.
- Point the manual to feature list_builtins map_create_flags for the
  accepted symbolic names and rewrap the feature documentation.

The parser and tests are unchanged from v4.

v4: https://lore.kernel.org/r/20260911025044.190540-1-diannaaav@gmail.com
Review: https://lore.kernel.org/r/523c73e7f76e0634a3e061e76ca4c39eb21cb006fc78875ddaf6a35e38bfd500@mail.kernel.org

Validation:
- Rebuilt bpftool, its manual pages and the focused selftest runner.
- All 29 bpftool_map_flags subtests passed. The three revised series
  were tested together: 52 subtests passed with no skips or failures in
  an x86-64 KVM guest running Linux 7.3.0-rc2 from bpf/master, with
  LLVM 20-built BPF test objects.
- Bash syntax, bpftool synchronization checks and diff checks passed.
- The generated patches apply cleanly to current bpf-next.

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

Tianyi Chen (2):
  bpftool: Accept symbolic map creation flags
  selftests/bpf: Cover symbolic bpftool map creation flags

 .../bpftool/Documentation/bpftool-feature.rst |  16 +--
 .../bpf/bpftool/Documentation/bpftool-map.rst |  15 ++-
 tools/bpf/bpftool/bash-completion/bpftool     |  22 +++-
 tools/bpf/bpftool/feature.c                   |   7 +-
 tools/bpf/bpftool/main.h                      |   1 +
 tools/bpf/bpftool/map.c                       |  86 ++++++++++++++-
 .../bpf/prog_tests/bpftool_map_flags.c        | 100 ++++++++++++++++++
 7 files changed, 231 insertions(+), 16 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_map_flags.c


base-commit: af0b84a9215d951d16f26b7ee34353b970cf5d4e
-- 
2.55.0


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

end of thread, other threads:[~2026-09-11  3:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11  3:46 [PATCH bpf-next v5 0/2] bpftool: Support symbolic map creation flags Tianyi Chen
2026-09-11  3:46 ` [PATCH bpf-next v5 1/2] bpftool: Accept " Tianyi Chen
2026-09-11  3:46 ` [PATCH bpf-next v5 2/2] selftests/bpf: Cover symbolic bpftool " Tianyi Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).