diff mbox series

[net-next] netlink: specs: don't allow version to be specified for genetlink

Message ID 20231009154907.169117-1-jiri@resnulli.us (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] netlink: specs: don't allow version to be specified for genetlink | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 30 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Jiri Pirko Oct. 9, 2023, 3:49 p.m. UTC
From: Jiri Pirko <jiri@nvidia.com>

There is no good reason to specify the version for new protocols.
Forbid it in genetlink schema.

If the future proves me wrong, this restriction could be easily lifted.

Move the version definition in between legacy properties
in genetlink-legacy.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
---
 Documentation/netlink/genetlink-legacy.yaml | 8 ++++----
 Documentation/netlink/genetlink.yaml        | 4 ----
 2 files changed, 4 insertions(+), 8 deletions(-)

Comments

Jakub Kicinski Oct. 10, 2023, 1:26 a.m. UTC | #1
On Mon,  9 Oct 2023 17:49:07 +0200 Jiri Pirko wrote:
>  Documentation/netlink/genetlink-legacy.yaml | 8 ++++----
>  Documentation/netlink/genetlink.yaml        | 4 ----

You missed genetlink-c
Jiri Pirko Oct. 10, 2023, 7:26 a.m. UTC | #2
Tue, Oct 10, 2023 at 03:26:44AM CEST, kuba@kernel.org wrote:
>On Mon,  9 Oct 2023 17:49:07 +0200 Jiri Pirko wrote:
>>  Documentation/netlink/genetlink-legacy.yaml | 8 ++++----
>>  Documentation/netlink/genetlink.yaml        | 4 ----
>
>You missed genetlink-c

Ah, will fix.

>-- 
>pw-bot: cr
diff mbox series

Patch

diff --git a/Documentation/netlink/genetlink-legacy.yaml b/Documentation/netlink/genetlink-legacy.yaml
index 12a0a045605d..6300222f6c84 100644
--- a/Documentation/netlink/genetlink-legacy.yaml
+++ b/Documentation/netlink/genetlink-legacy.yaml
@@ -26,10 +26,6 @@  properties:
     type: string
   doc:
     type: string
-  version:
-    description: Generic Netlink family version. Default is 1.
-    type: integer
-    minimum: 1
   protocol:
     description: Schema compatibility level. Default is "genetlink".
     enum: [ genetlink, genetlink-c, genetlink-legacy ] # Trim
@@ -53,6 +49,10 @@  properties:
       Defines if the input policy in the kernel is global, per-operation, or split per operation type.
       Default is split.
     enum: [ split, per-op, global ]
+  version:
+    description: Generic Netlink family version. Default is 1.
+    type: integer
+    minimum: 1
   # End genetlink-legacy
 
   definitions:
diff --git a/Documentation/netlink/genetlink.yaml b/Documentation/netlink/genetlink.yaml
index 3d338c48bf21..f1427d7e3b4a 100644
--- a/Documentation/netlink/genetlink.yaml
+++ b/Documentation/netlink/genetlink.yaml
@@ -26,10 +26,6 @@  properties:
     type: string
   doc:
     type: string
-  version:
-    description: Generic Netlink family version. Default is 1.
-    type: integer
-    minimum: 1
   protocol:
     description: Schema compatibility level. Default is "genetlink".
     enum: [ genetlink ]