Skip to content

Commit 3449333

Browse files
Jiri Pirkokuba-moo
authored andcommitted
netlink: specs: devlink: extend per-instance dump commands to accept 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>
1 parent 4a1b5aa commit 3449333

File tree

4 files changed

+799
-78
lines changed

4 files changed

+799
-78
lines changed

Documentation/netlink/specs/devlink.yaml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ operations:
284284
attribute-set: devlink
285285
dont-validate:
286286
- strict
287-
- dump
288287

289288
do:
290289
pre: devlink-nl-pre-doit-port
@@ -299,6 +298,8 @@ operations:
299298
value: 7
300299
attributes: *port-id-attrs
301300
dump:
301+
request:
302+
attributes: *dev-id-attrs
302303
reply:
303304
value: 3 # due to a bug, port dump returns DEVLINK_CMD_NEW
304305
attributes: *port-id-attrs
@@ -311,7 +312,6 @@ operations:
311312
attribute-set: devlink
312313
dont-validate:
313314
- strict
314-
- dump
315315

316316
do:
317317
pre: devlink-nl-pre-doit
@@ -326,6 +326,8 @@ operations:
326326
value: 11
327327
attributes: *sb-id-attrs
328328
dump:
329+
request:
330+
attributes: *dev-id-attrs
329331
reply: *sb-get-reply
330332

331333
# TODO: fill in the operations in between
@@ -336,7 +338,6 @@ operations:
336338
attribute-set: devlink
337339
dont-validate:
338340
- strict
339-
- dump
340341

341342
do:
342343
pre: devlink-nl-pre-doit
@@ -352,6 +353,8 @@ operations:
352353
value: 15
353354
attributes: *sb-pool-id-attrs
354355
dump:
356+
request:
357+
attributes: *dev-id-attrs
355358
reply: *sb-pool-get-reply
356359

357360
# TODO: fill in the operations in between
@@ -362,7 +365,6 @@ operations:
362365
attribute-set: devlink
363366
dont-validate:
364367
- strict
365-
- dump
366368

367369
do:
368370
pre: devlink-nl-pre-doit-port
@@ -379,6 +381,8 @@ operations:
379381
value: 19
380382
attributes: *sb-port-pool-id-attrs
381383
dump:
384+
request:
385+
attributes: *dev-id-attrs
382386
reply: *sb-port-pool-get-reply
383387

384388
# TODO: fill in the operations in between
@@ -389,7 +393,6 @@ operations:
389393
attribute-set: devlink
390394
dont-validate:
391395
- strict
392-
- dump
393396

394397
do:
395398
pre: devlink-nl-pre-doit-port
@@ -407,6 +410,8 @@ operations:
407410
value: 23
408411
attributes: *sb-tc-pool-bind-id-attrs
409412
dump:
413+
request:
414+
attributes: *dev-id-attrs
410415
reply: *sb-tc-pool-bind-get-reply
411416

412417
# TODO: fill in the operations in between
@@ -417,7 +422,6 @@ operations:
417422
attribute-set: devlink
418423
dont-validate:
419424
- strict
420-
- dump
421425

422426
do:
423427
pre: devlink-nl-pre-doit
@@ -432,6 +436,8 @@ operations:
432436
value: 38
433437
attributes: *param-id-attrs
434438
dump:
439+
request:
440+
attributes: *dev-id-attrs
435441
reply: *param-get-reply
436442

437443
# TODO: fill in the operations in between
@@ -442,7 +448,6 @@ operations:
442448
attribute-set: devlink
443449
dont-validate:
444450
- strict
445-
- dump
446451

447452
do:
448453
pre: devlink-nl-pre-doit-port-optional
@@ -458,6 +463,8 @@ operations:
458463
value: 42
459464
attributes: *region-id-attrs
460465
dump:
466+
request:
467+
attributes: *dev-id-attrs
461468
reply: *region-get-reply
462469

463470
# TODO: fill in the operations in between
@@ -495,7 +502,6 @@ operations:
495502
attribute-set: devlink
496503
dont-validate:
497504
- strict
498-
- dump
499505

500506
do:
501507
pre: devlink-nl-pre-doit-port-optional
@@ -509,6 +515,8 @@ operations:
509515
reply: &health-reporter-get-reply
510516
attributes: *health-reporter-id-attrs
511517
dump:
518+
request:
519+
attributes: *dev-id-attrs
512520
reply: *health-reporter-get-reply
513521

514522
# TODO: fill in the operations in between
@@ -519,7 +527,6 @@ operations:
519527
attribute-set: devlink
520528
dont-validate:
521529
- strict
522-
- dump
523530

524531
do:
525532
pre: devlink-nl-pre-doit
@@ -534,6 +541,8 @@ operations:
534541
value: 61
535542
attributes: *trap-id-attrs
536543
dump:
544+
request:
545+
attributes: *dev-id-attrs
537546
reply: *trap-get-reply
538547

539548
# TODO: fill in the operations in between
@@ -544,7 +553,6 @@ operations:
544553
attribute-set: devlink
545554
dont-validate:
546555
- strict
547-
- dump
548556

549557
do:
550558
pre: devlink-nl-pre-doit
@@ -559,6 +567,8 @@ operations:
559567
value: 65
560568
attributes: *trap-group-id-attrs
561569
dump:
570+
request:
571+
attributes: *dev-id-attrs
562572
reply: *trap-group-get-reply
563573

564574
# TODO: fill in the operations in between
@@ -569,7 +579,6 @@ operations:
569579
attribute-set: devlink
570580
dont-validate:
571581
- strict
572-
- dump
573582

574583
do:
575584
pre: devlink-nl-pre-doit
@@ -584,6 +593,8 @@ operations:
584593
value: 69
585594
attributes: *trap-policer-id-attrs
586595
dump:
596+
request:
597+
attributes: *dev-id-attrs
587598
reply: *trap-policer-get-reply
588599

589600
# TODO: fill in the operations in between
@@ -594,7 +605,6 @@ operations:
594605
attribute-set: devlink
595606
dont-validate:
596607
- strict
597-
- dump
598608

599609
do:
600610
pre: devlink-nl-pre-doit
@@ -610,6 +620,8 @@ operations:
610620
value: 74
611621
attributes: *rate-id-attrs
612622
dump:
623+
request:
624+
attributes: *dev-id-attrs
613625
reply: *rate-get-reply
614626

615627
# TODO: fill in the operations in between
@@ -620,7 +632,6 @@ operations:
620632
attribute-set: devlink
621633
dont-validate:
622634
- strict
623-
- dump
624635

625636
do:
626637
pre: devlink-nl-pre-doit
@@ -635,6 +646,8 @@ operations:
635646
value: 78
636647
attributes: *linecard-id-attrs
637648
dump:
649+
request:
650+
attributes: *dev-id-attrs
638651
reply: *linecard-get-reply
639652

640653
# TODO: fill in the operations in between

0 commit comments

Comments
 (0)