netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Donald Hunter <donald.hunter@gmail.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org, donald.hunter@redhat.com
Subject: Re: [PATCH net-next v2 7/7] netlink: specs: wireless: add a spec for nl80211
Date: Wed, 11 Dec 2024 21:07:13 +0000	[thread overview]
Message-ID: <20241211210713.GE2806@kernel.org> (raw)
In-Reply-To: <20241210161448.76799-8-donald.hunter@gmail.com>

On Tue, Dec 10, 2024 at 04:14:48PM +0000, Donald Hunter wrote:
> Add a rudimentary YNL spec for nl80211 that covers get-wiphy,
> get-interface and get-protocol-features.
> 
> ./tools/net/ynl/cli.py \
>     --spec Documentation/netlink/specs/nl80211.yaml \
>     --do get-protocol-features
> {'protocol-features': {'split-wiphy-dump'}}
> 
> ./tools/net/ynl/cli.py \
>     --spec Documentation/netlink/specs/nl80211.yaml \
>     --dump get-wiphy --json '{ "split-wiphy-dump": true }'
> 
> ./tools/net/ynl/cli.py \
>     --spec Documentation/netlink/specs/nl80211.yaml \
>     --dump get-interface
> 
> Signed-off-by: Donald Hunter <donald.hunter@gmail.com>

Hi Donald,

Perhaps I'm doing something silly here, or my environment is somehow
broken. But with this patch applied I see:

make -C tools/net/ynl/ distclean && make -C tools/net/ynl/

...

-e      GEN nl80211-user.c
Traceback (most recent call last):
  File "/home/horms/projects/linux/linux/tools/net/ynl/generated/../ynl-gen-c.py", line 3018, in <module>
    main()
  File "/home/horms/projects/linux/linux/tools/net/ynl/generated/../ynl-gen-c.py", line 2727, in main
    parsed = Family(args.spec, exclude_ops)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/horms/projects/linux/linux/tools/net/ynl/generated/../ynl-gen-c.py", line 928, in __init__
    super().__init__(file_name, exclude_ops=exclude_ops)
  File "/home/horms/projects/linux/linux/tools/net/ynl/lib/nlspec.py", line 480, in __init__
    elem.resolve()
  File "/home/horms/projects/linux/linux/tools/net/ynl/generated/../ynl-gen-c.py", line 946, in resolve
    self.resolve_up(super())
  File "/home/horms/projects/linux/linux/tools/net/ynl/lib/nlspec.py", line 53, in resolve_up
    up.resolve()
  File "/home/horms/projects/linux/linux/tools/net/ynl/lib/nlspec.py", line 588, in resolve
    attr_set = self.new_attr_set(elem)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/horms/projects/linux/linux/tools/net/ynl/generated/../ynl-gen-c.py", line 992, in new_attr_set
    return AttrSet(self, elem)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/horms/projects/linux/linux/tools/net/ynl/generated/../ynl-gen-c.py", line 824, in __init__
    super().__init__(family, yaml)
  File "/home/horms/projects/linux/linux/tools/net/ynl/lib/nlspec.py", line 215, in __init__
    attr = self.new_attr(elem, val)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/horms/projects/linux/linux/tools/net/ynl/generated/../ynl-gen-c.py", line 873, in new_attr
    raise Exception(f'new_attr: unsupported sub-type {elem["sub-type"]}')
Exception: new_attr: unsupported sub-type u32
make[1]: *** [Makefile:37: nl80211-user.c] Error 1


  reply	other threads:[~2024-12-11 21:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 16:14 [PATCH net-next v2 0/7] netlink: specs: add a spec for nl80211 wiphy Donald Hunter
2024-12-10 16:14 ` [PATCH net-next v2 1/7] tools/net/ynl: remove extraneous plural from variable names Donald Hunter
2024-12-10 16:14 ` [PATCH net-next v2 2/7] tools/net/ynl: support decoding indexed arrays as enums Donald Hunter
2024-12-10 16:14 ` [PATCH net-next v2 3/7] tools/net/ynl: support rendering C array members to strings Donald Hunter
2024-12-10 16:14 ` [PATCH net-next v2 4/7] tools/net/ynl: accept IP string inputs Donald Hunter
2024-12-10 16:14 ` [PATCH net-next v2 5/7] netlink: specs: support nested structs in genetlink legacy Donald Hunter
2024-12-10 16:14 ` [PATCH net-next v2 6/7] netlink: specs: add s8, s16 to genetlink schemas Donald Hunter
2024-12-10 16:14 ` [PATCH net-next v2 7/7] netlink: specs: wireless: add a spec for nl80211 Donald Hunter
2024-12-11 21:07   ` Simon Horman [this message]
2024-12-11 22:24     ` Donald Hunter
2024-12-12  8:36   ` Johannes Berg
2024-12-18 14:32     ` Donald Hunter
2024-12-18 14:37       ` Johannes Berg

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=20241211210713.GE2806@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=donald.hunter@redhat.com \
    --cc=edumazet@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).