Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: netlink: document the sub-type attribute property

Add a definition for sub-type to the protocol spec doc and a description of
its usage for C arrays in genetlink-legacy.

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Donald Hunter and committed by
Jakub Kicinski
04eac393 88e28896

+24
+10
Documentation/userspace-api/netlink/specs.rst
··· 254 254 The validation policy in the kernel is formed by combining the type 255 255 definition (``type`` and ``nested-attributes``) and the ``checks``. 256 256 257 + sub-type 258 + ~~~~~~~~ 259 + 260 + Legacy families have special ways of expressing arrays. ``sub-type`` can be 261 + used to define the type of array members in case array members are not 262 + fully defined as attributes (in a bona fide attribute space). For instance 263 + a C array of u32 values can be specified with ``type: binary`` and 264 + ``sub-type: u32``. Binary types and legacy array formats are described in 265 + more detail in :doc:`genetlink-legacy`. 266 + 257 267 operations 258 268 ---------- 259 269