Skip to content

Commit

Permalink
netlink: specs: don't allow version to be specified for genetlink
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20231010074810.191177-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jiri Pirko authored and Jakub Kicinski committed Oct 11, 2023
1 parent 9b47243 commit 0f07415
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 0 additions & 4 deletions Documentation/netlink/genetlink-c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down
8 changes: 4 additions & 4 deletions Documentation/netlink/genetlink-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions Documentation/netlink/genetlink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down

0 comments on commit 0f07415

Please sign in to comment.