From: Jakub Kicinski <kuba@kernel.org>
To: Donald Hunter <donald.hunter@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Jiri Pirko <jiri@resnulli.us>,
Stanislav Fomichev <sdf@google.com>,
donald.hunter@redhat.com
Subject: Re: [PATCH net-next v2 5/5] doc/netlink/specs: Add spec for nlctrl netlink family
Date: Wed, 6 Mar 2024 10:31:14 -0800 [thread overview]
Message-ID: <20240306103114.41a1cfb4@kernel.org> (raw)
In-Reply-To: <20240306125704.63934-6-donald.hunter@gmail.com>
On Wed, 6 Mar 2024 12:57:04 +0000 Donald Hunter wrote:
> diff --git a/Documentation/netlink/specs/nlctrl.yaml b/Documentation/netlink/specs/nlctrl.yaml
> new file mode 100644
> index 000000000000..2e55e61aea11
> --- /dev/null
> +++ b/Documentation/netlink/specs/nlctrl.yaml
> @@ -0,0 +1,206 @@
> +# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
> +
> +name: nlctrl
> +protocol: genetlink-legacy
> +uapi-header: linux/genetlink.h
> +
> +doc: |
> + Genetlink control.
How about:
genetlink meta-family, exposes information about all
genetlink families registered in the kernel (including itself).
> +definitions:
> + -
> + name: op-flags
> + type: flags
> + enum-name: ''
I've used
enum-name:
i.e. empty value in other places.
Is using empty string more idiomatic?
Unnamed enums are kinda special in my mind, because we will use normal
integer types to store the values in code gen.
> + entries:
> + - admin-perm
> + - cmd-cap-do
> + - cmd-cap-dump
> + - cmd-cap-haspol
> + - uns-admin-perm
> + -
> + name: attr-type
> + enum-name: netlink_attribute_type
s/_/-/
The codegen will convert them back
> + type: enum
> + entries:
> + - invalid
> + - flag
> + - u8
> + - u16
> + - u32
> + - u64
> + - s8
> + - s16
> + - s32
> + - s64
> + - binary
> + - string
> + - nul-string
> + - nested
> + - nested-array
> + - bitfield32
> + - sint
> + - uint
> +
> +attribute-sets:
> + -
> + name: ctrl-attrs
> + name-prefix: CTRL_ATTR_
also: s/_/-/ and lower case, code-gen will take care of the exact
formatting.
With those nits:
Acked-by: Jakub Kicinski <kuba@kernel.org>
I haven't checked the exact formatting, but off the top of my head
the contents look good :)
next prev parent reply other threads:[~2024-03-06 18:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 12:56 [PATCH net-next v2 0/5] tools/net/ynl: Add support for nlctrl netlink family Donald Hunter
2024-03-06 12:57 ` [PATCH net-next v2 1/5] tools/net/ynl: Fix extack decoding for netlink-raw Donald Hunter
2024-03-06 16:33 ` Jakub Kicinski
2024-03-06 12:57 ` [PATCH net-next v2 2/5] tools/net/ynl: Report netlink errors without stacktrace Donald Hunter
2024-03-06 16:33 ` Jakub Kicinski
2024-03-06 12:57 ` [PATCH net-next v2 3/5] tools/net/ynl: Fix c codegen for array-nest Donald Hunter
2024-03-06 18:03 ` Jakub Kicinski
2024-03-06 12:57 ` [PATCH net-next v2 4/5] tools/net/ynl: Add nest-type-value decoding Donald Hunter
2024-03-06 18:07 ` Jakub Kicinski
2024-03-06 12:57 ` [PATCH net-next v2 5/5] doc/netlink/specs: Add spec for nlctrl netlink family Donald Hunter
2024-03-06 18:31 ` Jakub Kicinski [this message]
2024-03-06 22:54 ` Donald Hunter
2024-03-07 0:04 ` Jakub Kicinski
2024-03-07 8:58 ` Donald Hunter
2024-03-06 18:32 ` [PATCH net-next v2 0/5] tools/net/ynl: Add support " Jakub Kicinski
2024-03-06 22:14 ` Donald Hunter
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=20240306103114.41a1cfb4@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=donald.hunter@redhat.com \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@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).