Skip to content

Commit

Permalink
netlink: specs: devlink: extend per-instance dump commands to accept …
Browse files Browse the repository at this point in the history
…instance attributes

Extend per-instance dump command definitions to accept instance
attributes. Allow parsing of devlink handle attributes so they could
be used for instance selection.

Re-generate the related code.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20230811155714.1736405-12-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jiri Pirko authored and kuba-moo committed Aug 14, 2023
1 parent 4a1b5aa commit 3449333
Show file tree
Hide file tree
Showing 4 changed files with 799 additions and 78 deletions.
39 changes: 26 additions & 13 deletions Documentation/netlink/specs/devlink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit-port
Expand All @@ -299,6 +298,8 @@ operations:
value: 7
attributes: *port-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply:
value: 3 # due to a bug, port dump returns DEVLINK_CMD_NEW
attributes: *port-id-attrs
Expand All @@ -311,7 +312,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit
Expand All @@ -326,6 +326,8 @@ operations:
value: 11
attributes: *sb-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *sb-get-reply

# TODO: fill in the operations in between
Expand All @@ -336,7 +338,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit
Expand All @@ -352,6 +353,8 @@ operations:
value: 15
attributes: *sb-pool-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *sb-pool-get-reply

# TODO: fill in the operations in between
Expand All @@ -362,7 +365,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit-port
Expand All @@ -379,6 +381,8 @@ operations:
value: 19
attributes: *sb-port-pool-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *sb-port-pool-get-reply

# TODO: fill in the operations in between
Expand All @@ -389,7 +393,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit-port
Expand All @@ -407,6 +410,8 @@ operations:
value: 23
attributes: *sb-tc-pool-bind-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *sb-tc-pool-bind-get-reply

# TODO: fill in the operations in between
Expand All @@ -417,7 +422,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit
Expand All @@ -432,6 +436,8 @@ operations:
value: 38
attributes: *param-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *param-get-reply

# TODO: fill in the operations in between
Expand All @@ -442,7 +448,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit-port-optional
Expand All @@ -458,6 +463,8 @@ operations:
value: 42
attributes: *region-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *region-get-reply

# TODO: fill in the operations in between
Expand Down Expand Up @@ -495,7 +502,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit-port-optional
Expand All @@ -509,6 +515,8 @@ operations:
reply: &health-reporter-get-reply
attributes: *health-reporter-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *health-reporter-get-reply

# TODO: fill in the operations in between
Expand All @@ -519,7 +527,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit
Expand All @@ -534,6 +541,8 @@ operations:
value: 61
attributes: *trap-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *trap-get-reply

# TODO: fill in the operations in between
Expand All @@ -544,7 +553,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit
Expand All @@ -559,6 +567,8 @@ operations:
value: 65
attributes: *trap-group-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *trap-group-get-reply

# TODO: fill in the operations in between
Expand All @@ -569,7 +579,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit
Expand All @@ -584,6 +593,8 @@ operations:
value: 69
attributes: *trap-policer-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *trap-policer-get-reply

# TODO: fill in the operations in between
Expand All @@ -594,7 +605,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit
Expand All @@ -610,6 +620,8 @@ operations:
value: 74
attributes: *rate-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *rate-get-reply

# TODO: fill in the operations in between
Expand All @@ -620,7 +632,6 @@ operations:
attribute-set: devlink
dont-validate:
- strict
- dump

do:
pre: devlink-nl-pre-doit
Expand All @@ -635,6 +646,8 @@ operations:
value: 78
attributes: *linecard-id-attrs
dump:
request:
attributes: *dev-id-attrs
reply: *linecard-get-reply

# TODO: fill in the operations in between
Expand Down
Loading

0 comments on commit 3449333

Please sign in to comment.