1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
5 protocol: genetlink-legacy
7 doc: Partial family for Devlink.
22 name-prefix: devlink-attr-
35 # TODO: fill in the attributes in between
42 # TODO: fill in the attributes in between
54 # TODO: fill in the attributes in between
61 # TODO: fill in the attributes in between
68 # TODO: fill in the attributes in between
75 # TODO: fill in the attributes in between
78 name: info-driver-name
82 name: info-serial-number
85 name: info-version-fixed
88 nested-attributes: dl-info-version
90 name: info-version-running
93 nested-attributes: dl-info-version
95 name: info-version-stored
98 nested-attributes: dl-info-version
100 name: info-version-name
103 name: info-version-value
106 # TODO: fill in the attributes in between
109 name: health-reporter-name
113 # TODO: fill in the attributes in between
120 # TODO: fill in the attributes in between
123 name: trap-group-name
131 # TODO: fill in the attributes in between
134 name: trap-policer-id
138 # TODO: fill in the attributes in between
145 # TODO: fill in the attributes in between
151 nested-attributes: dl-dev-stats
155 nested-attributes: dl-reload-stats
157 name: reload-stats-entry
160 nested-attributes: dl-reload-stats-entry
162 name: reload-stats-limit
165 name: reload-stats-value
168 name: remote-reload-stats
170 nested-attributes: dl-reload-stats
172 name: reload-action-info
175 nested-attributes: dl-reload-act-info
177 name: reload-action-stats
180 nested-attributes: dl-reload-act-stats
182 # TODO: fill in the attributes in between
189 # TODO: fill in the attributes in between
204 name: remote-reload-stats
207 name: dl-reload-stats
211 name: reload-action-info
214 name: dl-reload-act-info
221 name: reload-action-stats
224 name: dl-reload-act-stats
228 name: reload-stats-entry
231 name: dl-reload-stats-entry
235 name: reload-stats-limit
238 name: reload-stats-value
241 name: dl-info-version
245 name: info-version-name
248 name: info-version-value
252 enum-model: directional
256 doc: Get devlink instances.
257 attribute-set: devlink
263 pre: devlink-nl-pre-doit
264 post: devlink-nl-post-doit
267 attributes: &dev-id-attrs
283 doc: Get devlink port instances.
284 attribute-set: devlink
289 pre: devlink-nl-pre-doit-port
290 post: devlink-nl-post-doit
293 attributes: &port-id-attrs
299 attributes: *port-id-attrs
302 attributes: *dev-id-attrs
304 value: 3 # due to a bug, port dump returns DEVLINK_CMD_NEW
305 attributes: *port-id-attrs
307 # TODO: fill in the operations in between
311 doc: Get shared buffer instances.
312 attribute-set: devlink
317 pre: devlink-nl-pre-doit
318 post: devlink-nl-post-doit
321 attributes: &sb-id-attrs
327 attributes: *sb-id-attrs
330 attributes: *dev-id-attrs
333 # TODO: fill in the operations in between
337 doc: Get shared buffer pool instances.
338 attribute-set: devlink
343 pre: devlink-nl-pre-doit
344 post: devlink-nl-post-doit
347 attributes: &sb-pool-id-attrs
352 reply: &sb-pool-get-reply
354 attributes: *sb-pool-id-attrs
357 attributes: *dev-id-attrs
358 reply: *sb-pool-get-reply
360 # TODO: fill in the operations in between
363 name: sb-port-pool-get
364 doc: Get shared buffer port-pool combinations and threshold.
365 attribute-set: devlink
370 pre: devlink-nl-pre-doit-port
371 post: devlink-nl-post-doit
374 attributes: &sb-port-pool-id-attrs
380 reply: &sb-port-pool-get-reply
382 attributes: *sb-port-pool-id-attrs
385 attributes: *dev-id-attrs
386 reply: *sb-port-pool-get-reply
388 # TODO: fill in the operations in between
391 name: sb-tc-pool-bind-get
392 doc: Get shared buffer port-TC to pool bindings and threshold.
393 attribute-set: devlink
398 pre: devlink-nl-pre-doit-port
399 post: devlink-nl-post-doit
402 attributes: &sb-tc-pool-bind-id-attrs
409 reply: &sb-tc-pool-bind-get-reply
411 attributes: *sb-tc-pool-bind-id-attrs
414 attributes: *dev-id-attrs
415 reply: *sb-tc-pool-bind-get-reply
417 # TODO: fill in the operations in between
421 doc: Get param instances.
422 attribute-set: devlink
427 pre: devlink-nl-pre-doit
428 post: devlink-nl-post-doit
431 attributes: ¶m-id-attrs
435 reply: ¶m-get-reply
437 attributes: *param-id-attrs
440 attributes: *dev-id-attrs
441 reply: *param-get-reply
443 # TODO: fill in the operations in between
447 doc: Get region instances.
448 attribute-set: devlink
453 pre: devlink-nl-pre-doit-port-optional
454 post: devlink-nl-post-doit
457 attributes: ®ion-id-attrs
462 reply: ®ion-get-reply
464 attributes: *region-id-attrs
467 attributes: *dev-id-attrs
468 reply: *region-get-reply
470 # TODO: fill in the operations in between
474 doc: Get device information, like driver name, hardware and firmware versions etc.
475 attribute-set: devlink
481 pre: devlink-nl-pre-doit
482 post: devlink-nl-post-doit
485 attributes: *dev-id-attrs
486 reply: &info-get-reply
494 - info-version-running
495 - info-version-stored
497 reply: *info-get-reply
500 name: health-reporter-get
501 doc: Get health reporter instances.
502 attribute-set: devlink
507 pre: devlink-nl-pre-doit-port-optional
508 post: devlink-nl-post-doit
510 attributes: &health-reporter-id-attrs
514 - health-reporter-name
515 reply: &health-reporter-get-reply
516 attributes: *health-reporter-id-attrs
519 attributes: *port-id-attrs
520 reply: *health-reporter-get-reply
522 # TODO: fill in the operations in between
526 doc: Get trap instances.
527 attribute-set: devlink
532 pre: devlink-nl-pre-doit
533 post: devlink-nl-post-doit
536 attributes: &trap-id-attrs
540 reply: &trap-get-reply
542 attributes: *trap-id-attrs
545 attributes: *dev-id-attrs
546 reply: *trap-get-reply
548 # TODO: fill in the operations in between
552 doc: Get trap group instances.
553 attribute-set: devlink
558 pre: devlink-nl-pre-doit
559 post: devlink-nl-post-doit
562 attributes: &trap-group-id-attrs
566 reply: &trap-group-get-reply
568 attributes: *trap-group-id-attrs
571 attributes: *dev-id-attrs
572 reply: *trap-group-get-reply
574 # TODO: fill in the operations in between
577 name: trap-policer-get
578 doc: Get trap policer instances.
579 attribute-set: devlink
584 pre: devlink-nl-pre-doit
585 post: devlink-nl-post-doit
588 attributes: &trap-policer-id-attrs
592 reply: &trap-policer-get-reply
594 attributes: *trap-policer-id-attrs
597 attributes: *dev-id-attrs
598 reply: *trap-policer-get-reply
600 # TODO: fill in the operations in between
604 doc: Get rate instances.
605 attribute-set: devlink
610 pre: devlink-nl-pre-doit
611 post: devlink-nl-post-doit
614 attributes: &rate-id-attrs
619 reply: &rate-get-reply
621 attributes: *rate-id-attrs
624 attributes: *dev-id-attrs
625 reply: *rate-get-reply
627 # TODO: fill in the operations in between
631 doc: Get line card instances.
632 attribute-set: devlink
637 pre: devlink-nl-pre-doit
638 post: devlink-nl-post-doit
641 attributes: &linecard-id-attrs
645 reply: &linecard-get-reply
647 attributes: *linecard-id-attrs
650 attributes: *dev-id-attrs
651 reply: *linecard-get-reply
653 # TODO: fill in the operations in between
657 doc: Get device selftest instances.
658 attribute-set: devlink
664 pre: devlink-nl-pre-doit
665 post: devlink-nl-post-doit
668 attributes: *dev-id-attrs
669 reply: &selftests-get-reply
671 attributes: *dev-id-attrs
673 reply: *selftests-get-reply