Re: [PATCH net-next v4 7/7] docs: netlink: document the sub-type attribute property
From: Jakub Kicinski <kuba@kernel.org>
Date: 2023-03-25 03:57:28
Also in:
linux-doc
From: Jakub Kicinski <kuba@kernel.org>
Date: 2023-03-25 03:57:28
Also in:
linux-doc
On Fri, 24 Mar 2023 19:19:00 +0000 Donald Hunter wrote:
+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`.