[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240306103114.41a1cfb4@kernel.org>
Date: Wed, 6 Mar 2024 10:31:14 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Donald Hunter <donald.hunter@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Jacob
Keller <jacob.e.keller@...el.com>, Jiri Pirko <jiri@...nulli.us>, Stanislav
Fomichev <sdf@...gle.com>, donald.hunter@...hat.com
Subject: Re: [PATCH net-next v2 5/5] doc/netlink/specs: Add spec for nlctrl
netlink family
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@...nel.org>
I haven't checked the exact formatting, but off the top of my head
the contents look good :)
Powered by blists - more mailing lists