From: netdev-bot+sashiko@kernel.org
To: hangbin.liu@linux.dev
Cc: dsahern@kernel.org, idosch@nvidia.com, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
donald.hunter@gmail.com, edumazet@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, liuhangbin@kylinos.cn
Subject: Re: [PATCH net-next v4 6/6] netlink: specs: rt-route: describe seg6-local attrs
Date: Fri, 09 Oct 2026 09:07:02 +0000 [thread overview]
Message-ID: <179153682273.434549.16560900955866234642@kernel.org> (raw)
In-Reply-To: <20261008-ynl_rt_encap-v4-6-4ed2ccf7f949@kylinos.cn>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The patch adds the `seg6-local-flv-ops` enum to
Documentation/netlink/specs/rt-route.yaml with `unspec` as its first…
--
netlink: specs: rt-route: describe seg6-local attrs
This commit adds two enums to the rt-route spec: the SEG6 local actions and
the seg6-local flavor operations. It also changes the bpf, counters and
flavors attributes in seg6-local from binary to nested attribute sets
(seg6-local-bpf, seg6-local-cnt and seg6-local-flv).
> diff --git a/Documentation/netlink/specs/rt-route.yaml b/Documentation/netlink/specs/rt-route.yaml
> index 82e59af56ecdb..48d1659f20f34 100644
> --- a/Documentation/netlink/specs/rt-route.yaml
> +++ b/Documentation/netlink/specs/rt-route.yaml
> @@ -116,6 +116,45 @@ definitions:
[ ... ]
> + -
> + name: seg6-local-flv-ops
> + type: enum
> + name-prefix: seg6-local-flv-op-
> + enum-name:
> + entries:
> + -
> + name: unspec
> + -
> + name: psp
> + -
> + name: usp
> + -
> + name: usd
> + -
> + name: next-csid
[ ... ]
> @@ -618,6 +661,50 @@ attribute-sets:
[ ... ]
> + -
> + name: seg6-local-flv
> + name-prefix: seg6-local-flv-
> + attributes:
> + -
> + name: operation
> + type: u32
> + enum: seg6-local-flv-ops
> + enum-as-flags: true
[Severity: Low]
With enum-as-flags set, should unspec still be the first entry of
seg6-local-flv-ops?
YNL turns each entry's value into a bit position in this mode:
tools/net/ynl/pyynl/lib/nlspec.py:EnumEntry.user_value() {
if self.enum_set['type'] == 'flags' or as_flags:
return 1 << self.value
}
The flag values come out as unspec=0x1, psp=0x2, usp=0x4, usd=0x8 and
next-csid=0x10.
The psp through next-csid bits line up with the kernel's
SEG6_F_LOCAL_FLV_OP(flvname), which is BIT(SEG6_LOCAL_FLV_OP_##flvname). Bit
0 (UNSPEC), however, is not a real flavor operation. The supported masks in
net/ipv6/seg6_local.c contain only NEXT_CSID and PSP:
#define SEG6_LOCAL_END_FLV_SUPP_OPS (SEG6_F_LOCAL_FLV_NEXT_CSID | \
SEG6_LOCAL_FLV8986_SUPP_OPS)
#define SEG6_LOCAL_END_X_FLV_SUPP_OPS SEG6_F_LOCAL_FLV_NEXT_CSID
parse_nla_flavors() rejects every bit outside these masks:
if (rc < 0 || (fops & ~supp_fops)) {
NL_SET_ERR_MSG(extack, "Unsupported Flavor operation(s)");
return -EOPNOTSUPP;
}
As a result, the spec offers an "unspec" flag that the kernel never reports
in a dump. When it is sent in a request, the kernel always rejects it with
-EOPNOTSUPP.
devlink.yaml's reload-action enum is also used with enum-as-flags, and it
handles this by leaving out unspec and setting value: 1 on its first entry.
Could this spec do the same? Dropping unspec and giving psp value: 1 would
keep every real bit in place.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261008-ynl_rt_encap-v4-0-4ed2ccf7f949%40kylinos.cn
prev parent reply other threads:[~2026-10-09 9:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 8:24 [PATCH net-next v4 0/6] netlink: add lwtunnel encap sub-message support to rt-route Hangbin Liu
2026-10-08 8:24 ` [PATCH net-next v4 1/6] net: lwtunnel: change encap fill order Hangbin Liu
2026-10-08 8:24 ` [PATCH net-next v4 2/6] tools: ynl: convert enum selector to string for sub-message parsing Hangbin Liu
2026-10-09 9:06 ` netdev-bot+sashiko
2026-10-09 9:40 ` Hangbin Liu
2026-10-08 8:24 ` [PATCH net-next v4 3/6] netlink: specs: rt-route: add lwtunnel encap sub-message support Hangbin Liu
2026-10-09 9:06 ` netdev-bot+sashiko
2026-10-08 8:24 ` [PATCH net-next v4 4/6] netlink: specs: rt-route: describe lwtunnel IP options Hangbin Liu
2026-10-09 9:07 ` netdev-bot+sashiko
2026-10-09 9:44 ` Hangbin Liu
2026-10-08 8:24 ` [PATCH net-next v4 5/6] netlink: specs: rt-route: describe lwt BPF program options Hangbin Liu
2026-10-08 8:24 ` [PATCH net-next v4 6/6] netlink: specs: rt-route: describe seg6-local attrs Hangbin Liu
2026-10-09 9:07 ` netdev-bot+sashiko [this message]
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=179153682273.434549.16560900955866234642@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=hangbin.liu@linux.dev \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuhangbin@kylinos.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®