Thread (1 message) 1 message, 1 author, 2023-08-16

Re: [PATCH net-next v2 02/10] doc/netlink: Document the genetlink-legacy schema extensions

From: Donald Hunter <donald.hunter@gmail.com>
Date: 2023-08-16 08:47:11
Also in: linux-doc

Jakub Kicinski [off-list ref] writes:
On Tue, 15 Aug 2023 20:42:46 +0100 Donald Hunter wrote:
quoted
Add description of genetlink-legacy specific attributes to the ynl spec
documentation.

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
---
 Documentation/userspace-api/netlink/specs.rst | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
Should we merge this with genetlink-legacy.rst?
Sure, I can do that.
quoted
diff --git a/Documentation/userspace-api/netlink/specs.rst b/Documentation/userspace-api/netlink/specs.rst
index 2e4acde890b7..dde70f9674d4 100644
--- a/Documentation/userspace-api/netlink/specs.rst
+++ b/Documentation/userspace-api/netlink/specs.rst
@@ -443,3 +443,50 @@ nest
 
 Attribute containing other (nested) attributes.
 ``nested-attributes`` specifies which attribute set is used inside.
+
+genetlink-legacy
+================
+
+The genetlink-legacy schema extends the genetlink schema with some additional
+properties that are needed to support legacy genetlink families.
+
+Globals
+-------
+
+ - ``kernel-policy`` - Specify whether the kernel input policy is ``global``,
+   ``per-op`` or ``split``.
Maybe a few more words:

 Specify whether the kernel input policy is ``global`` i.e. the same for
 all operation of the family, defined for each operation individually 
 (``per-op``), or separately for each operation and operation type
 (do vs dump) - ``split``.
Ack. As an aside, what do we mean by "kernel input policy"?
quoted
+   ``per-op`` or ``split``.
quoted
+Struct definitions
+------------------
+
+There is a new type of definition called ``struct`` which is used for declaring
+the C struct format of fixed headers and binary attributes.
+
+members
+~~~~~~~
+
+ - ``name`` - The attribute name of the struct member
+ - ``type`` - One of the scalar types ``u8``, ``u16``, ``u32``, ``u64``, ``s8``,
+   ``s16``, ``s32``, ``s64``, ``string`` or ``binary``.
+ - ``byte-order`` - ``big-endian`` or ``little-endian``
+ - ``doc``, ``enum``, ``enum-as-flags``, ``display-hint`` - Same as for
+   attribute definitions.
Hm, genetlink-legacy.rst has this:

https://docs.kernel.org/next/userspace-api/netlink/genetlink-legacy.html#structures

But the larger section is called "Other quirks (todo)"
I guess you have tackled most of the items in this section
so we shouldn't call it "todo" ?
I'll clean up genetlink-legacy.rst when I merge these changes.

Thanks for the review!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help