]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
doc/netlink: netlink-raw: Add max check
authorRemy D. Farley <one-d-wide@protonmail.com>
Tue, 3 Mar 2026 19:57:41 +0000 (19:57 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Mar 2026 02:49:08 +0000 (18:49 -0800)
Add definitions for max check and len-or-limit type, the same as in other
specifications.

Suggested-by: Donald Hunter <donald.hunter@gmail.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: Remy D. Farley <one-d-wide@protonmail.com>
Link: https://patch.msgid.link/20260303195638.381642-2-one-d-wide@protonmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/netlink-raw.yaml

index 0166a7e4afbbf7c2d5217972dff192b6ca521618..dd98dda55bd0fd6eec0f149fac7b19541d395d47 100644 (file)
@@ -19,6 +19,12 @@ $defs:
     type: [ string, integer ]
     pattern: ^[0-9A-Za-z_-]+( - 1)?$
     minimum: 0
+  len-or-limit:
+    # literal int, const name, or limit based on fixed-width type
+    # e.g. u8-min, u16-max, etc.
+    type: [ string, integer ]
+    pattern: ^[0-9A-Za-z_-]+$
+    minimum: 0
 
 # Schema for specs
 title: Protocol
@@ -270,7 +276,10 @@ properties:
                     type: string
                   min:
                     description: Min value for an integer attribute.
-                    type: integer
+                    $ref: '#/$defs/len-or-limit'
+                  max:
+                    description: Max value for an integer attribute.
+                    $ref: '#/$defs/len-or-limit'
                   min-len:
                     description: Min length for a binary attribute.
                     $ref: '#/$defs/len-or-define'