Skip to content

Commit 5447b08

Browse files
committed
Merge branch 'tools-net-ynl-add-support-for-netlink-raw-families'
Donald Hunter says: ==================== tools/net/ynl: Add support for netlink-raw families This patchset adds support for netlink-raw families such as rtnetlink. Patch 1 fixes a typo in existing schemas Patch 2 contains the schema definition Patches 3 & 4 update the schema documentation Patches 5 - 9 extends ynl Patches 10 - 12 add several netlink-raw specs The netlink-raw schema is very similar to genetlink-legacy and I thought about making the changes there and symlinking to it. On balance I thought that might be problematic for accurate schema validation. rtnetlink doesn't seem to fit into unified or directional message enumeration models. It seems like an 'explicit' model would be useful, to force the schema author to specify the message ids directly. There is not yet support for notifications because ynl currently doesn't support defining 'event' properties on a 'do' operation. The message ids are shared so ops need to be both sync and async. I plan to look at this in a future patch. The link and route messages contain different nested attributes dependent on the type of link or route. Decoding these will need some kind of attr-space selection that uses the value of another attribute as the selector key. These nested attributes have been left with type 'binary' for now. ==================== Link: https://lore.kernel.org/r/20230825122756.7603-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 75d6d8b + 023289b commit 5447b08

15 files changed

Lines changed: 2632 additions & 72 deletions

File tree

Documentation/core-api/netlink.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ Globals
6767
kernel-policy
6868
~~~~~~~~~~~~~
6969

70-
Defines if the kernel validation policy is per operation (``per-op``)
71-
or for the entire family (``global``). New families should use ``per-op``
72-
(default) to be able to narrow down the attributes accepted by a specific
73-
command.
70+
Defines whether the kernel validation policy is ``global`` i.e. the same for all
71+
operations of the family, defined for each operation individually - ``per-op``,
72+
or separately for each operation and operation type (do vs dump) - ``split``.
73+
New families should use ``per-op`` (default) to be able to narrow down the
74+
attributes accepted by a specific command.
7475

7576
checks
7677
------

Documentation/netlink/genetlink-c.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ properties:
4141
description: Name of the define for the family name.
4242
type: string
4343
c-version-name:
44-
description: Name of the define for the verion of the family.
44+
description: Name of the define for the version of the family.
4545
type: string
4646
max-by-define:
4747
description: Makes the number of attributes and commands be specified by a define, not an enum value.

Documentation/netlink/genetlink-legacy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ properties:
4141
description: Name of the define for the family name.
4242
type: string
4343
c-version-name:
44-
description: Name of the define for the verion of the family.
44+
description: Name of the define for the version of the family.
4545
type: string
4646
max-by-define:
4747
description: Makes the number of attributes and commands be specified by a define, not an enum value.

0 commit comments

Comments
 (0)