From: Hangbin Liu <hangbin.liu@linux.dev>
To: sashiko-reviews@lists.linux.dev
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 3/6] netlink: specs: rt-route: add lwtunnel encap sub-message support
Date: Fri, 18 Sep 2026 15:51:40 +0800 [thread overview]
Message-ID: <aqztjJazXlf-VT-d@fedora> (raw)
In-Reply-To: <20260918063656.953941F00898@smtp.kernel.org>
On Fri, Sep 18, 2026 at 06:36:56AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] netlink: missing byte-order: big-endian in rt-route specs
Thanks, I will fix all these byte order issue.
> --
>
> commit 18041b529d7678ae7bbdd8ee61a7fb4213ae6804
> Author: Hangbin Liu <liuhangbin@kylinos.cn>
>
> netlink: specs: rt-route: add lwtunnel encap sub-message support
>
> This commit adds lwtunnel encapsulation sub-message support to the rt-route
> netlink specs, defining various tunnel attribute sets such as mpls, ip, ip6,
> seg6, bpf, etc. It updates the yaml spec for rt-route and adds necessary
> headers to the Makefile dependencies.
>
> > diff --git a/Documentation/netlink/specs/rt-route.yaml b/Documentation/netlink/specs/rt-route.yaml
> > index 253037ea5176a..0e236da140dc5 100644
> > --- a/Documentation/netlink/specs/rt-route.yaml
> > +++ b/Documentation/netlink/specs/rt-route.yaml
> [ ... ]
> > @@ -277,6 +332,229 @@ attribute-sets:
> > -
> > name: fastopen-no-cookie
> > type: u32
> [ ... ]
> > + -
> > + name: lwtunnel-ip
> > + name-prefix: lwtunnel-ip-
> > + header: linux/lwtunnel.h
> > + attributes:
> > + -
> > + name: id
> > + type: u64
>
> [Severity: High]
> Does this field need a byte-order: big-endian annotation? The kernel
> reads LWTUNNEL_IP_ID as be64 using nla_get_be64(). Without the annotation,
> YNL tools will byte-swap this on little-endian architectures, potentially
> causing silent data corruption.
>
> > + -
> > + name: dst
> > + type: u32
> > + byte-order: big-endian
> > + display-hint: ipv4
> > + -
> > + name: src
> > + type: u32
> > + byte-order: big-endian
> > + display-hint: ipv4
> > + -
> > + name: ttl
> > + type: u8
> > + -
> > + name: tos
> > + type: u8
> > + -
> > + name: flags
> > + type: u16
>
> [Severity: High]
> Does this field also need a byte-order: big-endian annotation? The kernel
> reads LWTUNNEL_IP_FLAGS as be16 using nla_get_be16().
>
> [ ... ]
> > + -
> > + name: lwtunnel-ip6
> > + name-prefix: lwtunnel-ip6-
> > + header: linux/lwtunnel.h
> > + attributes:
> > + -
> > + name: id
> > + type: u64
>
> [Severity: High]
> Could this also be missing a byte-order: big-endian annotation? The kernel
> reads LWTUNNEL_IP6_ID as be64.
>
> [ ... ]
> > + -
> > + name: hoplimit
> > + type: u8
> > + -
> > + name: tc
> > + type: u8
> > + -
> > + name: flags
> > + type: u16
>
> [Severity: High]
> Could this also be missing a byte-order: big-endian annotation? The kernel
> reads LWTUNNEL_IP6_FLAGS as be16.
>
> [ ... ]
> > + -
> > + name: seg6-local
> > + name-prefix: seg6-local-
> > + header: linux/seg6_local.h
> > + attributes:
> [ ... ]
> > + -
> > + name: table
> > + type: u32
> > + -
> > + name: nh4
> > + type: u32
> > + display-hint: ipv4
>
> [Severity: High]
> Does this field need a byte-order: big-endian annotation? SEG6_LOCAL_NH4 is
> a raw IPv4 address and handled as a struct in_addr in the kernel, but here
> it is typed as a native u32. This might cause YNL tools to silently
> byte-swap the address on little-endian architectures.
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260917-ynl_rt_encap-v1-0-fbbe6e680571@kylinos.cn?part=3
next prev parent reply other threads:[~2026-09-18 7:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 6:35 [PATCH net-next 0/6] netlink: add lwtunnel encap sub-message support to rt-route Hangbin Liu
2026-09-17 6:35 ` [PATCH net-next 1/6] net: lwtunnel: change encap fill order Hangbin Liu
2026-09-21 6:38 ` netdev-bot+sashiko
2026-09-17 6:35 ` [PATCH net-next 2/6] tools: ynl: convert enum selector to string for sub-message parsing Hangbin Liu
[not found] ` <20260918063657.4D10F1F00899@smtp.kernel.org>
2026-09-18 9:29 ` Hangbin Liu
2026-09-21 6:38 ` netdev-bot+sashiko
2026-09-17 6:35 ` [PATCH net-next 3/6] netlink: specs: rt-route: add lwtunnel encap sub-message support Hangbin Liu
[not found] ` <20260918063656.953941F00898@smtp.kernel.org>
2026-09-18 7:51 ` Hangbin Liu [this message]
2026-09-21 6:38 ` netdev-bot+sashiko
2026-09-17 6:35 ` [PATCH net-next 4/6] netlink: specs: rt-route: describe lwtunnel IP options Hangbin Liu
[not found] ` <20260918063658.80E4F1F000FF@smtp.kernel.org>
2026-09-18 8:02 ` Hangbin Liu
2026-09-21 6:38 ` netdev-bot+sashiko
2026-09-21 9:26 ` Hangbin Liu
2026-09-17 6:35 ` [PATCH net-next 5/6] netlink: specs: rt-route: describe lwt BPF program options Hangbin Liu
[not found] ` <20260918063655.EA1DC1F00893@smtp.kernel.org>
2026-09-18 7:32 ` Hangbin Liu
2026-09-21 6:38 ` netdev-bot+sashiko
2026-09-21 9:46 ` Hangbin Liu
2026-09-17 6:35 ` [PATCH net-next 6/6] netlink: specs: rt-route: describe seg6-local actions, counters and flavors Hangbin Liu
2026-09-21 6:38 ` netdev-bot+sashiko
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=aqztjJazXlf-VT-d@fedora \
--to=hangbin.liu@linux.dev \
--cc=netdev@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox