All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hangbin Liu" <hangbin.liu@linux.dev>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net-next v2 5/6] netlink: specs: rt-route: describe lwt BPF program options
Date: Mon, 21 Sep 2026 10:07:42 +0000	[thread overview]
Message-ID: <20260921100742.F0E621F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260920-ynl_rt_encap-v2-5-c664a3e726f6@kylinos.cn>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] netlink: seg6-local BPF attribute uses wrong UAPI header enums via lwt-bpf-prog
--

commit cddba7a35aae1dfa7f35285fd4781c86739950cc
Author: Hangbin Liu <liuhangbin@kylinos.cn>

netlink: specs: rt-route: describe lwt BPF program options

Replace binary BPF attributes with a nested lwt-bpf-prog to support
lwt bpf prog options.

> diff --git a/Documentation/netlink/specs/rt-route.yaml b/Documentation/netlink/specs/rt-route.yaml
> index 4b12a8a586521..4a3953c9e9780 100644
> --- a/Documentation/netlink/specs/rt-route.yaml
> +++ b/Documentation/netlink/specs/rt-route.yaml

[ ... ]

> @@ -508,7 +511,8 @@ attribute-sets:
>          type: u32
>        -
>          name: bpf
> -        type: binary
> +        type: nest
> +        nested-attributes: lwt-bpf-prog
>        -
>          name: vrftable
>          type: u32

[Severity: Low]
Does this incorrectly reuse lwt-bpf-prog for the seg6-local attribute-set's
bpf attribute?

By using the lwt-bpf-prog nested-attributes here, the generated YNL userspace
API will use linux/lwtunnel.h constants (LWT_BPF_PROG_FD, LWT_BPF_PROG_NAME)
instead of the correct linux/seg6_local.h constants (SEG6_LOCAL_BPF_PROG,
SEG6_LOCAL_BPF_PROG_NAME).

This leaks abstraction and forces users to include lwtunnel.h for seg6-local
operations. While there may be no runtime impact since the enum values happen
to align, should this instead use a dedicated seg6-local nested attribute set
to ensure proper UAPI encapsulation?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260920-ynl_rt_encap-v2-0-c664a3e726f6@kylinos.cn?part=5

  reply	other threads:[~2026-09-21 10:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-20 10:06 [PATCH net-next v2 0/6] netlink: add lwtunnel encap sub-message support to rt-route Hangbin Liu
2026-09-20 10:06 ` [PATCH net-next v2 1/6] net: lwtunnel: change encap fill order Hangbin Liu
2026-09-20 10:06 ` [PATCH net-next v2 2/6] tools: ynl: convert enum selector to string for sub-message parsing Hangbin Liu
2026-09-24  1:14   ` Jakub Kicinski
2026-09-20 10:06 ` [PATCH net-next v2 3/6] netlink: specs: rt-route: add lwtunnel encap sub-message support Hangbin Liu
2026-09-24  1:14   ` Jakub Kicinski
2026-09-24  3:13     ` Hangbin Liu
2026-09-24 15:53       ` Jakub Kicinski
2026-09-20 10:06 ` [PATCH net-next v2 4/6] netlink: specs: rt-route: describe lwtunnel IP options Hangbin Liu
2026-09-21 10:07   ` sashiko-bot
2026-09-20 10:06 ` [PATCH net-next v2 5/6] netlink: specs: rt-route: describe lwt BPF program options Hangbin Liu
2026-09-21 10:07   ` sashiko-bot [this message]
2026-09-20 10:06 ` [PATCH net-next v2 6/6] netlink: specs: rt-route: describe seg6-local actions, counters and flavors Hangbin Liu

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=20260921100742.F0E621F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=hangbin.liu@linux.dev \
    --cc=sashiko-reviews@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.