summaryrefslogtreecommitdiffstats
path: root/Documentation/netlink
diff options
context:
space:
mode:
authorDavide Caratti <dcaratti@redhat.com>2023-10-27 16:04:54 +0200
committerJakub Kicinski <kuba@kernel.org>2023-10-27 14:56:04 -0700
commit6479c975b20a7fe6ecacec3a60dc6f838ecee9d6 (patch)
tree568ff2e67aea51821b462f5a24d5531df7879c53 /Documentation/netlink
parentd96e48a3d55db7ee62e607ad2d89eee1a8585028 (diff)
downloadlinux-stable-6479c975b20a7fe6ecacec3a60dc6f838ecee9d6.tar.gz
linux-stable-6479c975b20a7fe6ecacec3a60dc6f838ecee9d6.tar.bz2
linux-stable-6479c975b20a7fe6ecacec3a60dc6f838ecee9d6.zip
doc/netlink: Update schema to support cmd-cnt-name and cmd-max-name
allow specifying cmd-cnt-name and cmd-max-name in netlink specs, in accordance with Documentation/userspace-api/netlink/c-code-gen.rst. Use cmd-cnt-name and attr-cnt-name in the mptcp yaml spec and in the corresponding uAPI headers, to preserve the #defines we had in the past and avoid adding new ones. v2: - squash modification in mptcp.yaml and MPTCP uAPI headers Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Davide Caratti <dcaratti@redhat.com> Link: https://lore.kernel.org/r/12d4ed0116d8883cf4b533b856f3125a34e56749.1698415310.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'Documentation/netlink')
-rw-r--r--Documentation/netlink/genetlink-c.yaml6
-rw-r--r--Documentation/netlink/genetlink-legacy.yaml6
-rw-r--r--Documentation/netlink/netlink-raw.yaml6
-rw-r--r--Documentation/netlink/specs/mptcp.yaml2
4 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/netlink/genetlink-c.yaml b/Documentation/netlink/genetlink-c.yaml
index 9d13bbb7ae47..c58f7153fcf8 100644
--- a/Documentation/netlink/genetlink-c.yaml
+++ b/Documentation/netlink/genetlink-c.yaml
@@ -47,6 +47,12 @@ properties:
max-by-define:
description: Makes the number of attributes and commands be specified by a define, not an enum value.
type: boolean
+ cmd-max-name:
+ description: Name of the define for the last operation in the list.
+ type: string
+ cmd-cnt-name:
+ description: The explicit name for constant holding the count of operations (last operation + 1).
+ type: string
# End genetlink-c
definitions:
diff --git a/Documentation/netlink/genetlink-legacy.yaml b/Documentation/netlink/genetlink-legacy.yaml
index 0daf40402a29..938703088306 100644
--- a/Documentation/netlink/genetlink-legacy.yaml
+++ b/Documentation/netlink/genetlink-legacy.yaml
@@ -47,6 +47,12 @@ properties:
max-by-define:
description: Makes the number of attributes and commands be specified by a define, not an enum value.
type: boolean
+ cmd-max-name:
+ description: Name of the define for the last operation in the list.
+ type: string
+ cmd-cnt-name:
+ description: The explicit name for constant holding the count of operations (last operation + 1).
+ type: string
# End genetlink-c
# Start genetlink-legacy
kernel-policy:
diff --git a/Documentation/netlink/netlink-raw.yaml b/Documentation/netlink/netlink-raw.yaml
index 48db31f1d059..775cce8c548a 100644
--- a/Documentation/netlink/netlink-raw.yaml
+++ b/Documentation/netlink/netlink-raw.yaml
@@ -47,6 +47,12 @@ properties:
max-by-define:
description: Makes the number of attributes and commands be specified by a define, not an enum value.
type: boolean
+ cmd-max-name:
+ description: Name of the define for the last operation in the list.
+ type: string
+ cmd-cnt-name:
+ description: The explicit name for constant holding the count of operations (last operation + 1).
+ type: string
# End genetlink-c
# Start genetlink-legacy
kernel-policy:
diff --git a/Documentation/netlink/specs/mptcp.yaml b/Documentation/netlink/specs/mptcp.yaml
index ec5c454a87ea..49f90cfb4698 100644
--- a/Documentation/netlink/specs/mptcp.yaml
+++ b/Documentation/netlink/specs/mptcp.yaml
@@ -8,6 +8,7 @@ c-family-name: mptcp-pm-name
c-version-name: mptcp-pm-ver
max-by-define: true
kernel-policy: per-op
+cmd-cnt-name: --mptcp-pm-cmd-after-last
definitions:
-
@@ -167,6 +168,7 @@ attribute-sets:
-
name: attr
name-prefix: mptcp-pm-attr-
+ attr-cnt-name: --mptcp-attr-after-last
attributes:
-
name: unspec