Thread (1 message) 1 message, 1 author, 2023-03-27

Re: [PATCH net-next v4 7/7] docs: netlink: document the sub-type attribute property

From: Donald Hunter <donald.hunter@gmail.com>
Date: 2023-03-27 08:14:32
Also in: linux-doc

Jakub Kicinski [off-list ref] writes:
On Fri, 24 Mar 2023 19:19:00 +0000 Donald Hunter wrote:
quoted
+sub-type
+~~~~~~~~
+
+Attributes can have a ``sub-type`` that is interpreted in a ``type``
+specific way. For example, an attribute with ``type: binary`` can have
+``sub-type: u32`` which says to interpret the binary blob as an array of
+``u32``. Binary types are described in more detail in
+:doc:`genetlink-legacy`.
I think sub-type is only used for arrays? How about:

 Legacy families have special ways of expressing arrays. ``sub-type``
 can be used to define the type of array members in case array members
 are not fully defined as attributes (in a bona fide attribute space).
 For instance a C array of u32 values can be specified with 
 ``type: binary`` and ``sub-type: u32``. Binary types and legacy array
 formats are described in more detail in :doc:`genetlink-legacy`.
I'll use this text verbatim. Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help