From: Eduard Zingerman <eddyz87@gmail.com>
To: Anton Protopopov <a.s.protopopov@gmail.com>, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next] bpf: simplify code by exporting a btf helper
Date: Tue, 24 Jun 2025 14:10:52 -0700 [thread overview]
Message-ID: <55bdd85e5db7dae94016ae57bf2d1ff233dc0881.camel@gmail.com> (raw)
In-Reply-To: <20250624193655.733050-1-a.s.protopopov@gmail.com>
On Tue, 2025-06-24 at 19:36 +0000, Anton Protopopov wrote:
> There are places in code which can be simplified by using the
> btf_type_is_regular_int() helper (slightly patched to add an
> additional, optional, argument to check the exact size). So
> patch the helper, export it, and simplify code in a few files.
> (Suggested by Eduard in a bit different form in [1].)
>
> [1] https://lore.kernel.org/bpf/7edb47e73baa46705119a23c6bf4af26517a640f.camel@gmail.com/
>
> Suggested-by: Eduard Zingerman <eddyz87@gmail.com>
> Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
> ---
I think such cleanup makes sense.
Imo, the patch would be a bit simpler if:
- original interface of the btf_type_int_is_regular() is preserved,
thus avoiding most of the changes in the btf.c;
- helpers btf_is_i32 and btf_is_i64 are introduced for external usage.
E.g. like here:
https://github.com/kernel-patches/bpf/commit/d3c003f0a83cb66700f6a6e9b750d8e425b53cf5
(I use btf_is_u{32,64} there, but it should be i{32,64}).
Nit: the subject is a bit too generic.
[...]
next prev parent reply other threads:[~2025-06-24 21:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 19:36 [PATCH bpf-next] bpf: simplify code by exporting a btf helper Anton Protopopov
2025-06-24 21:10 ` Eduard Zingerman [this message]
2025-06-25 15:12 ` Anton Protopopov
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=55bdd85e5db7dae94016ae57bf2d1ff233dc0881.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=a.s.protopopov@gmail.com \
--cc=bpf@vger.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.