public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nick Hudson" <nhudson@akamai.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v4 1/6] bpf: name the enum for BPF_FUNC_skb_adjust_room flags
Date: Thu, 16 Apr 2026 10:02:23 +0000	[thread overview]
Message-ID: <20260416100225.178D6C2BCAF@smtp.kernel.org> (raw)
In-Reply-To: <20260416075514.927101-2-nhudson@akamai.com>

Sashiko AI review found 1 potential issue(s):
- [Medium] The newly named `enum bpf_adj_room_flags` will not be emitted into the kernel's BTF, rendering the intended CO-RE lookups non-functional.
--

commit d9be60117de7ebbae2642c8a29e31a5aa11ff502
Author: Nick Hudson <nhudson@akamai.com>

bpf: name the enum for BPF_FUNC_skb_adjust_room flags

This commit names the previously anonymous enum for BPF_FUNC_skb_adjust_room
flags to bpf_adj_room_flags. The stated goal is to enable CO-RE lookups in
BPF programs.

> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index c8d400b7680a8..bc4b25eb72ce5 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> @@ -6209,7 +6209,7 @@ enum {
>  };
>  
>  /* BPF_FUNC_skb_adjust_room flags. */
> -enum {
> +enum bpf_adj_room_flags {

Since this enum is only declared in the UAPI header and never actually used as
a variable, parameter, or struct field type in the kernel C code, will the
compiler generate DWARF debug information for it?

If it is omitted from the DWARF info, pahole will not emit it into the
vmlinux BTF. This causes libbpf CO-RE checks for these values to silently
evaluate to false regardless of the kernel version, which seems to defeat the
purpose of this patch.

Does the kernel need to explicitly force the emission of this type into the
target BTF, for example by using BTF_TYPE_EMIT(enum bpf_adj_room_flags) in a
compiled C file?

>  	BPF_F_ADJ_ROOM_FIXED_GSO	= (1ULL << 0),
>  	BPF_F_ADJ_ROOM_ENCAP_L3_IPV4	= (1ULL << 1),
>  	BPF_F_ADJ_ROOM_ENCAP_L3_IPV6	= (1ULL << 2),

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260416075514.927101-1-nhudson@akamai.com?part=1

  reply	other threads:[~2026-04-16 10:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16  7:55 [PATCH bpf-next v4 0/6] bpf: decap flags and GSO state updates Nick Hudson
2026-04-16  7:55 ` [PATCH bpf-next v4 1/6] bpf: name the enum for BPF_FUNC_skb_adjust_room flags Nick Hudson
2026-04-16 10:02   ` sashiko-bot [this message]
2026-04-16 14:18     ` Alexei Starovoitov
2026-04-17 11:44       ` Hudson, Nick
2026-04-16  7:55 ` [PATCH bpf-next v4 2/6] bpf: refactor masks for ADJ_ROOM flags and encap validation Nick Hudson
2026-04-16  7:55 ` [PATCH bpf-next v4 3/6] bpf: add BPF_F_ADJ_ROOM_DECAP_* flags for tunnel decapsulation Nick Hudson
2026-04-16  7:55 ` [PATCH bpf-next v4 4/6] bpf: allow new DECAP flags and add guard rails Nick Hudson
2026-04-16  7:55 ` [PATCH bpf-next v4 5/6] bpf: clear decap tunnel GSO state in skb_adjust_room Nick Hudson
2026-04-16  8:34   ` bot+bpf-ci
2026-04-16 12:03   ` sashiko-bot
2026-04-16 12:32   ` Willem de Bruijn
2026-04-17 12:27     ` Hudson, Nick
2026-04-16  7:55 ` [PATCH bpf-next v4 6/6] selftests/bpf: tc_tunnel validate decap GSO state Nick Hudson
2026-04-16 12:33   ` Willem de Bruijn
2026-04-16 12:43   ` sashiko-bot
2026-04-16 19:46     ` Martin KaFai Lau

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=20260416100225.178D6C2BCAF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=nhudson@akamai.com \
    --cc=sashiko@lists.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