From: Ihor Solodrai <ihor.solodrai@linux.dev>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Eduard Zingerman <eddyz87@gmail.com>, bpf <bpf@vger.kernel.org>,
Kernel Team <kernel-team@meta.com>
Subject: Re: [PATCH bpf-next v3 1/2] bpf: Support struct btf_struct_meta via KF_IMPLICIT_ARGS
Date: Fri, 27 Mar 2026 14:08:34 -0700 [thread overview]
Message-ID: <97357814-57e9-498f-894f-4c5dc4e3d0ce@linux.dev> (raw)
In-Reply-To: <CAADnVQLUTNoa4qXW357CU5e2hP+DpxM=QYK2ZuWHR_aLbmb7Hg@mail.gmail.com>
On 3/27/26 2:00 PM, Alexei Starovoitov wrote:
> On Fri, Mar 27, 2026 at 1:55 PM Ihor Solodrai <ihor.solodrai@linux.dev> wrote:
>>
>> On 3/27/26 1:48 PM, Alexei Starovoitov wrote:
>>> On Thu, Mar 26, 2026 at 12:13 PM Ihor Solodrai <ihor.solodrai@linux.dev> wrote:
>>>>
>>>> [...]
>>>>
>>>> The above works, and the question now is if we like this mechanism
>>>> more than current setup with explicit enums.
>>>
>>> Got it. Thanks for the explanation.
>>> Your approach does sound a lot better than explicit enums.
>>> Make a proper patch out of it.
>>>
>>> If we do this can we remove <counter><line> approach everywhere
>>> while at it and only use named ?
>>
>> This crossed my mind too. I'll try to *replace* the suffixes and if
>> it works fine submit that.
>>
>> One inconvenience is that with named suffixes BTF_ID() macro will
>> have to accept an additional arg (the list name), but I think
>> that's ok. We already have to pass struct/func everywhere too.
>
> and that name has to be unique.. I think it's fine.
> I'd do such change, and reuse all of BTF_ID macros.
> So that only BTF_SET_START line will differ.
>
> The overall diff stat shouldn't be big ?
Depends on whether we are refactoring BTF_ID, or just adding new
BTF_ID_NAMED set of macros.
Refactoring would touch every single BTF_ID usage, and that's
pretty invasive:
$ grep -r 'BTF_ID(' --include="*.[ch]" | wc -l
307
$ grep -rl 'BTF_ID(' --include="*.[ch]"
fs/bpf_fs_kfuncs.c
include/linux/btf_ids.h
kernel/bpf/bpf_lsm.c
kernel/bpf/bpf_struct_ops.c
kernel/bpf/btf.c
kernel/bpf/cpumask.c
kernel/bpf/crypto.c
kernel/bpf/helpers.c
kernel/bpf/verifier.c
kernel/trace/bpf_trace.c
net/bpf/test_run.c
net/core/filter.c
net/core/xdp.c
net/netfilter/nf_conntrack_bpf.c
net/sched/bpf_qdisc.c
tools/include/linux/btf_ids.h
tools/testing/selftests/bpf/prog_tests/resolve_btfids.c
tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
next prev parent reply other threads:[~2026-03-27 21:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 23:42 [PATCH bpf-next v3 1/2] bpf: Support struct btf_struct_meta via KF_IMPLICIT_ARGS Ihor Solodrai
2026-03-18 23:42 ` [PATCH bpf-next v3 2/2] selftests/bpf: Update kfuncs using btf_struct_meta to new variants Ihor Solodrai
2026-03-19 12:30 ` Jiri Olsa
2026-03-19 20:43 ` Ihor Solodrai
2026-03-20 11:06 ` Jiri Olsa
2026-03-20 14:50 ` Mykyta Yatsenko
2026-03-19 12:25 ` [PATCH bpf-next v3 1/2] bpf: Support struct btf_struct_meta via KF_IMPLICIT_ARGS Jiri Olsa
2026-03-19 20:37 ` Ihor Solodrai
2026-03-20 15:49 ` Mykyta Yatsenko
2026-03-27 0:16 ` Ihor Solodrai
2026-03-27 19:19 ` Mykyta Yatsenko
2026-03-21 20:27 ` Alexei Starovoitov
2026-03-23 19:58 ` Ihor Solodrai
2026-03-24 17:22 ` Alexei Starovoitov
2026-03-26 19:13 ` Ihor Solodrai
2026-03-27 20:48 ` Alexei Starovoitov
2026-03-27 20:55 ` Ihor Solodrai
2026-03-27 21:00 ` Alexei Starovoitov
2026-03-27 21:08 ` Ihor Solodrai [this message]
2026-03-27 21:47 ` Alexei Starovoitov
2026-03-27 22:06 ` Ihor Solodrai
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=97357814-57e9-498f-894f-4c5dc4e3d0ce@linux.dev \
--to=ihor.solodrai@linux.dev \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--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