public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Mykyta Yatsenko <mykyta.yatsenko5@gmail.com>
To: Alan Maguire <alan.maguire@oracle.com>,
	bot+bpf-ci@kernel.org, ast@kernel.org, daniel@iogearbox.net,
	andrii@kernel.org
Cc: martin.lau@linux.dev, eddyz87@gmail.com, memxor@gmail.com,
	song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org,
	qmo@kernel.org, bpf@vger.kernel.org, martin.lau@kernel.org,
	clm@meta.com, ihor.solodrai@linux.dev
Subject: Re: [PATCH v3 bpf-next 6/6] Documentation/bpf: Update btf doc with updated vlen, kind sizes
Date: Mon, 20 Apr 2026 12:48:10 +0100	[thread overview]
Message-ID: <cfae3249-ada9-411a-9c31-234bea85a981@gmail.com> (raw)
In-Reply-To: <4c95e885-1b21-4e25-b9c5-b6a2c37bcf1c@oracle.com>



On 4/20/26 9:09 AM, Alan Maguire wrote:
> On 17/04/2026 16:39, bot+bpf-ci@kernel.org wrote:
>>> diff --git a/Documentation/bpf/btf.rst b/Documentation/bpf/btf.rst
>>> index 3b60583f5db2..3f05f17990ad 100644
>>> --- a/Documentation/bpf/btf.rst
>>> +++ b/Documentation/bpf/btf.rst
>>> @@ -97,10 +97,8 @@ Each type contains the following common data::
>>>       struct btf_type {
>>>           __u32 name_off;
>>>           /* "info" bits arrangement
>>> -         * bits  0-15: vlen (e.g. # of struct's members)
>>> -         * bits 16-23: unused
>>> -         * bits 24-28: kind (e.g. int, ptr, array...etc)
>>> -         * bits 29-30: unused
>>> +         * bits  0-23: vlen (e.g. # of struct's members)
>>> +         * bits 24-30: kind (e.g. int, ptr, array...etc)
>>
>> Does the kind field documentation accurately match the UAPI implementation?
>> The UAPI defines BTF_INFO_KIND as:
>>
>>      #define BTF_INFO_KIND(info)     (((info) >> 24) & 0x7f)
>>
>> The mask 0x7f is 7 bits, which means kind occupies bits 24-30. This
>> documentation shows "bits 24-30" which appears correct.
>>
>> However, checking the actual implementation confirms the kind field uses
>> only 7 bits (0x7f mask), leaving bit 31 exclusively for kind_flag.
>>
> 
> maybe I'm misreading this (I've reread it several times) but I think the AI has
> misfired here; it's seems be questioning whether the docs match the UAPI change
> while at the same time confirming they match the UAPI change. Again I may be
> missing something...
>   

Yes, it looks like it did not properly see -/+ and messed up what was 
added/deleted.

>>
>> Should the documentation have removed the "bits 16-23: unused" description?
>> The previous documentation listed bits 16-23 as unused, but after expanding
>> vlen to bits 0-23, these bits are now part of vlen. The current bit
>> allocation is:
>>
>>      - Bits 0-23: vlen (24 bits)
>>      - Bits 24-30: kind (7 bits)
>>      - Bit 31: kind_flag (1 bit)
>>
>> The patch removes the "bits 16-23: unused" line from the struct comment,
>> which correctly reflects that these bits are now part of the expanded vlen
>> field.
>>
>>>            * bit     31: kind_flag, currently used by
>>>            *             struct, union, enum, fwd, enum64,
>>>            *             decl_tag and type_tag
>>
>>
>> ---
>> AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
>> See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
>>
>> CI run summary: https://github.com/kernel-patches/bpf/actions/runs/24570998051
> 


  reply	other threads:[~2026-04-20 11:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17 14:30 [PATCH v3 bpf-next 0/6] bpf: Extend BTF UAPI vlen, kinds to use unused bits Alan Maguire
2026-04-17 14:30 ` [PATCH v3 bpf-next 1/6] " Alan Maguire
2026-04-17 18:11   ` Mykyta Yatsenko
2026-04-17 14:30 ` [PATCH v3 bpf-next 2/6] libbpf: Adjust btf_vlen() to return a __u32 Alan Maguire
2026-04-17 17:07   ` sashiko-bot
2026-04-20  8:02     ` Alan Maguire
2026-04-20 15:39       ` Alexei Starovoitov
2026-04-20 16:07         ` Alan Maguire
2026-04-17 18:26   ` Mykyta Yatsenko
2026-04-17 14:30 ` [PATCH v3 bpf-next 3/6] bpftool: Support 24-bit vlen Alan Maguire
2026-04-17 18:36   ` Mykyta Yatsenko
2026-04-17 14:30 ` [PATCH v3 bpf-next 4/6] selftests/bpf: Fix up btf/invalid test for extended kind Alan Maguire
2026-04-17 19:07   ` Mykyta Yatsenko
2026-04-17 14:30 ` [PATCH v3 bpf-next 5/6] selftests/bpf: Fix up __u16 vlen assumptions Alan Maguire
2026-04-17 19:06   ` Mykyta Yatsenko
2026-04-17 14:30 ` [PATCH v3 bpf-next 6/6] Documentation/bpf: Update btf doc with updated vlen, kind sizes Alan Maguire
2026-04-17 15:39   ` bot+bpf-ci
2026-04-20  8:09     ` Alan Maguire
2026-04-20 11:48       ` Mykyta Yatsenko [this message]
2026-04-20 18:30 ` [PATCH v3 bpf-next 0/6] bpf: Extend BTF UAPI vlen, kinds to use unused bits David Faust
2026-04-20 19:24   ` Alan Maguire
2026-04-21  1:00 ` patchwork-bot+netdevbpf

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=cfae3249-ada9-411a-9c31-234bea85a981@gmail.com \
    --to=mykyta.yatsenko5@gmail.com \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clm@meta.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=qmo@kernel.org \
    --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