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,
kernel-team@meta.com
Subject: Re: [PATCH dwarves v3 3/3] btf_encoder: Factor out BPF kfunc emission
Date: Wed, 05 Nov 2025 14:07:52 -0800 [thread overview]
Message-ID: <5348259229fb7ae5b37b026cc4a403450cb3d62d.camel@gmail.com> (raw)
In-Reply-To: <20251105185926.296539-4-ihor.solodrai@linux.dev>
On Wed, 2025-11-05 at 10:59 -0800, Ihor Solodrai wrote:
[...]
> @@ -1408,6 +1394,28 @@ static int32_t btf_encoder__add_func(struct btf_encoder *encoder,
> return -1;
> }
>
> + return btf_fn_id;
> +}
> +
> +static int btf_encoder__add_bpf_kfunc(struct btf_encoder *encoder,
> + struct btf_encoder_func_state *state)
> +{
> + int btf_fn_id, err;
> +
> + if (encoder->tag_kfuncs && encoder->encode_attributes)
> + if (btf__add_bpf_arena_type_tags(encoder->btf, state) < 0)
> + return -1;
Nit: maybe keep the error check consistent with the one below? E.g.:
err = btf__add_bpf_arena_type_tags(...);
if (err)
return err;
?
> +
> + btf_fn_id = btf_encoder__add_func(encoder, state);
> + if (btf_fn_id < 0)
> + return -1;
> +
> + if (encoder->tag_kfuncs && !encoder->skip_encoding_decl_tag) {
> + err = btf__tag_kfunc(encoder->btf, state->elf, btf_fn_id);
> + if (err < 0)
> + return -1;
> + }
> +
> return 0;
> }
>
[...]
next prev parent reply other threads:[~2025-11-05 22:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 18:59 [PATCH dwarves v3 0/3] btf_encoder: refactor emission of BTF funcs Ihor Solodrai
2025-11-05 18:59 ` [PATCH dwarves v3 1/3] btf_encoder: Remove encoder pointer from btf_encoder_func_state Ihor Solodrai
2025-11-05 18:59 ` [PATCH dwarves v3 2/3] btf_encoder: Refactor btf_encoder__add_func_proto Ihor Solodrai
2025-11-05 18:59 ` [PATCH dwarves v3 3/3] btf_encoder: Factor out BPF kfunc emission Ihor Solodrai
2025-11-05 22:07 ` Eduard Zingerman [this message]
2025-11-05 22:08 ` [PATCH dwarves v3 0/3] btf_encoder: refactor emission of BTF funcs Eduard Zingerman
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=5348259229fb7ae5b37b026cc4a403450cb3d62d.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 \
/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