From: Donald Hunter <donald.hunter@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
edumazet@google.com, pabeni@redhat.com, andrew+netdev@lunn.ch,
horms@kernel.org, yuyanghuang@google.com,
jacob.e.keller@intel.com
Subject: Re: [PATCH net v2 3/3] netlink: specs: rt_addr: pull the ifa- prefix out of the names
Date: Wed, 02 Apr 2025 11:17:57 +0100 [thread overview]
Message-ID: <m2tt76hnoq.fsf@gmail.com> (raw)
In-Reply-To: <20250402010300.2399363-4-kuba@kernel.org> (Jakub Kicinski's message of "Tue, 1 Apr 2025 18:03:00 -0700")
Jakub Kicinski <kuba@kernel.org> writes:
> YAML specs don't normally include the C prefix name in the name
> of the YAML attr. Remove the ifa- prefix from all attributes
> in addr-attrs and specify name-prefix instead.
>
> This is a bit risky, hopefully there aren't many users out there.
>
> Fixes: dfb0f7d9d979 ("doc/netlink: Add spec for rt addr messages")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> Documentation/netlink/specs/rt_addr.yaml | 41 ++++++++++++------------
> tools/testing/selftests/net/rtnetlink.py | 2 +-
> 2 files changed, 22 insertions(+), 21 deletions(-)
>
> diff --git a/Documentation/netlink/specs/rt_addr.yaml b/Documentation/netlink/specs/rt_addr.yaml
> index 1650dc3f091a..d032562d1240 100644
> --- a/Documentation/netlink/specs/rt_addr.yaml
> +++ b/Documentation/netlink/specs/rt_addr.yaml
> @@ -78,45 +78,46 @@ protonum: 0
> attribute-sets:
> -
> name: addr-attrs
> + name-prefix: ifa-
> attributes:
> -
> - name: ifa-address
> + name: address
> type: binary
> display-hint: ipv4
> -
> - name: ifa-local
> + name: local
> type: binary
> display-hint: ipv4
> -
> - name: ifa-label
> + name: label
> type: string
> -
> - name: ifa-broadcast
> + name: broadcast
> type: binary
> display-hint: ipv4
> -
> - name: ifa-anycast
> + name: anycast
> type: binary
> -
> - name: ifa-cacheinfo
> + name: cacheinfo
> type: binary
> - struct: ifa-cacheinfo
> + struct: cacheinfo
The struct is still called ifa-cacheinfo so this breaks:
Error decoding 'cacheinfo' from 'addr-attrs'
Traceback (most recent call last):
...
File "/home/donaldh/net-next/tools/net/ynl/pyynl/lib/ynl.py", line 846, in _decode_struct
members = self.consts[name].members
~~~~~~~~~~~^^^^^^
KeyError: 'cacheinfo'
prev parent reply other threads:[~2025-04-02 10:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 1:02 [PATCH net v2 0/3] netlink: specs: rt_addr: fix problems revealed by C codegen Jakub Kicinski
2025-04-02 1:02 ` [PATCH net v2 1/3] netlink: specs: rt_addr: fix the spec format / schema failures Jakub Kicinski
2025-04-02 10:08 ` Donald Hunter
2025-04-02 18:41 ` Jacob Keller
2025-04-02 1:02 ` [PATCH net v2 2/3] netlink: specs: rt_addr: fix get multi command name Jakub Kicinski
2025-04-02 10:15 ` Donald Hunter
2025-04-02 18:42 ` Jacob Keller
2025-04-02 1:03 ` [PATCH net v2 3/3] netlink: specs: rt_addr: pull the ifa- prefix out of the names Jakub Kicinski
2025-04-02 10:17 ` Donald Hunter [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=m2tt76hnoq.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yuyanghuang@google.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;
as well as URLs for NNTP newsgroup(s).