From: Eduard Zingerman <eddyz87@gmail.com>
To: Ihor Solodrai <ihor.solodrai@linux.dev>,
dwarves@vger.kernel.org, alan.maguire@oracle.com,
acme@kernel.org
Cc: bpf@vger.kernel.org, andrii@kernel.org, ast@kernel.org,
tj@kernel.org, kernel-team@meta.com
Subject: Re: [PATCH dwarves v1 1/3] btf_encoder: refactor btf_encoder__add_func_proto
Date: Wed, 29 Oct 2025 17:34:37 -0700 [thread overview]
Message-ID: <ae1669b250a3e5532741e18f70f73e4e98a3bb48.camel@gmail.com> (raw)
In-Reply-To: <20251029190249.3323752-2-ihor.solodrai@linux.dev>
On Wed, 2025-10-29 at 12:02 -0700, Ihor Solodrai wrote:
> btf_encoder__add_func_proto() essentially implements two independent
> code paths depending on input arguments: one for struct ftype and the
> other for struct btf_encoder_func_state.
>
> Split btf_encoder__add_func_proto() into two variants:
> * btf_encoder__add_func_proto_for_ftype()
> * btf_encoder__add_func_proto_for_state()
>
> And factor out common btf_encoder__emit_func_proto() subroutine.
>
> No functional changes.
>
> Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Ha, check this out:
https://lore.kernel.org/bpf/18bee370c4804e666eb7d5360c47439c246e1cb7.camel@gmail.com/
Wrote same thing to Alan on Friday :)
> ---
> btf_encoder.c | 135 +++++++++++++++++++++++++++++---------------------
> 1 file changed, 79 insertions(+), 56 deletions(-)
>
> diff --git a/btf_encoder.c b/btf_encoder.c
> index 03bc3c7..0416824 100644
> --- a/btf_encoder.c
> +++ b/btf_encoder.c
[...]
> +static int32_t btf_encoder__add_func_proto_for_state(struct btf_encoder *encoder, struct btf_encoder_func_state *state)
You can get rid of the `encoder` parameter here.
See https://github.com/acmel/dwarves/commit/080d1f27ae71e30c269a1e26e85bb86c3683f195 .
[...]
next prev parent reply other threads:[~2025-10-30 0:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 19:02 [PATCH dwarves v1 0/3] btf_encoder: support for BPF magic kernel functions Ihor Solodrai
2025-10-29 19:02 ` [PATCH dwarves v1 1/3] btf_encoder: refactor btf_encoder__add_func_proto Ihor Solodrai
2025-10-30 0:34 ` Eduard Zingerman [this message]
2025-10-29 19:02 ` [PATCH dwarves v1 2/3] btf_encoder: factor out btf_encoder__add_bpf_kfunc() Ihor Solodrai
2025-10-29 19:02 ` [PATCH dwarves v1 3/3] btf_encoder: support kfuncs with KF_MAGIC_ARGS flag Ihor Solodrai
2025-11-04 20:59 ` [PATCH dwarves v1 0/3] btf_encoder: support for BPF magic kernel functions Alan Maguire
2025-11-04 22:25 ` Ihor Solodrai
2025-11-04 22:33 ` Eduard Zingerman
2025-11-04 22:37 ` Ihor Solodrai
2025-11-14 18:33 ` Alan Maguire
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=ae1669b250a3e5532741e18f70f73e4e98a3bb48.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=acme@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=dwarves@vger.kernel.org \
--cc=ihor.solodrai@linux.dev \
--cc=kernel-team@meta.com \
--cc=tj@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