mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Quentin Monnet <qmo@kernel.org>
To: chenyuan_fl@163.com, bpf@vger.kernel.org
Cc: Yuan Chen <chenyuan@kylinos.cn>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Jiri Olsa <jolsa@kernel.org>,
	Emil Tsalapatis <emil@etsalapatis.com>,
	Ihor Solodrai <ihor.solodrai@linux.dev>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next] bpftool: Print map_extra in map show
Date: Fri, 16 Oct 2026 15:25:06 +0100	[thread overview]
Message-ID: <b0cd17c2-2c57-4663-848e-f5831b275124@kernel.org> (raw)
In-Reply-To: <20261016071700.280539-2-chenyuan_fl@163.com>

2026-10-16 15:16 UTC+0800 ~ chenyuan_fl@163.com
> From: Yuan Chen <chenyuan@kylinos.cn>
> 
> bpf_map_info::map_extra carries per-map-type creation attributes
> (hash function count for bloom filter, VMA start for arena). The
> kernel prints it in fdinfo, but bpftool does not. Print the raw
> value in plain and JSON output when non-zero, without interpreting
> it per map type, like map_flags. The attribute is already overloaded
> per map type, and bpftool must not grow per-type knowledge of it.


Why not? Do we expect the semantic of map_extra to change? Having
something like "nr_hash_funcs 7" in plain output in the case of a Bloom
filter would be easier to interpret?


> 
> Example (bloom filter with 7 hash functions):
> 
>     117665: bloom_filter  name featu_bloom  flags 0x0
>             key 0B  value 8B  max_entries 128  map_extra 0x7  memlock 520B
>             pids fixture(3543054)
> 
> Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>

  reply	other threads:[~2026-10-16 14:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  7:16 [PATCH bpf-next] bpftool: Print verified instruction count in prog show chenyuan_fl
2026-10-16  7:16 ` [PATCH bpf-next] bpftool: Print map_extra in map show chenyuan_fl
2026-10-16 14:25   ` Quentin Monnet [this message]
2026-10-16 14:13 ` [PATCH bpf-next] bpftool: Print verified instruction count in prog show Justin Suess
2026-10-16 14:24 ` Quentin Monnet

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=b0cd17c2-2c57-4663-848e-f5831b275124@kernel.org \
    --to=qmo@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=chenyuan@kylinos.cn \
    --cc=chenyuan_fl@163.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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

all inboxes | Powered by JetHome®