powerpc/mm: Avoid calling arch_enter/leave_lazy_mmu() in set_ptes
[platform/kernel/linux-starfive.git] / Documentation / netlink / specs / devlink.yaml
1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2
3 name: devlink
4
5 protocol: genetlink-legacy
6
7 doc: Partial family for Devlink.
8
9 definitions:
10   -
11     type: enum
12     name: sb-pool-type
13     entries:
14       -
15         name: ingress
16       -
17         name: egress
18
19 attribute-sets:
20   -
21     name: devlink
22     name-prefix: devlink-attr-
23     attributes:
24       -
25         name: bus-name
26         type: string
27         value: 1
28       -
29         name: dev-name
30         type: string
31       -
32         name: port-index
33         type: u32
34
35       # TODO: fill in the attributes in between
36
37       -
38         name: sb-index
39         type: u32
40         value: 11
41
42       # TODO: fill in the attributes in between
43
44       -
45         name: sb-pool-index
46         type: u16
47         value: 17
48
49       -
50         name: sb-pool-type
51         type: u8
52         enum: sb-pool-type
53
54       # TODO: fill in the attributes in between
55
56       -
57         name: sb-tc-index
58         type: u16
59         value: 22
60
61       # TODO: fill in the attributes in between
62
63       -
64         name: param-name
65         type: string
66         value: 81
67
68       # TODO: fill in the attributes in between
69
70       -
71         name: region-name
72         type: string
73         value: 88
74
75       # TODO: fill in the attributes in between
76
77       -
78         name: info-driver-name
79         type: string
80         value: 98
81       -
82         name: info-serial-number
83         type: string
84       -
85         name: info-version-fixed
86         type: nest
87         multi-attr: true
88         nested-attributes: dl-info-version
89       -
90         name: info-version-running
91         type: nest
92         multi-attr: true
93         nested-attributes: dl-info-version
94       -
95         name: info-version-stored
96         type: nest
97         multi-attr: true
98         nested-attributes: dl-info-version
99       -
100         name: info-version-name
101         type: string
102       -
103         name: info-version-value
104         type: string
105
106       # TODO: fill in the attributes in between
107
108       -
109         name: health-reporter-name
110         type: string
111         value: 115
112
113       # TODO: fill in the attributes in between
114
115       -
116         name: trap-name
117         type: string
118         value: 130
119
120       # TODO: fill in the attributes in between
121
122       -
123         name: trap-group-name
124         type: string
125         value: 135
126
127       -
128         name: reload-failed
129         type: u8
130
131       # TODO: fill in the attributes in between
132
133       -
134         name: trap-policer-id
135         type: u32
136         value: 142
137
138       # TODO: fill in the attributes in between
139
140       -
141         name: reload-action
142         type: u8
143         value: 153
144
145       # TODO: fill in the attributes in between
146
147       -
148         name: dev-stats
149         type: nest
150         value: 156
151         nested-attributes: dl-dev-stats
152       -
153         name: reload-stats
154         type: nest
155         nested-attributes: dl-reload-stats
156       -
157         name: reload-stats-entry
158         type: nest
159         multi-attr: true
160         nested-attributes: dl-reload-stats-entry
161       -
162         name: reload-stats-limit
163         type: u8
164       -
165         name: reload-stats-value
166         type: u32
167       -
168         name: remote-reload-stats
169         type: nest
170         nested-attributes: dl-reload-stats
171       -
172         name: reload-action-info
173         type: nest
174         multi-attr: true
175         nested-attributes: dl-reload-act-info
176       -
177         name: reload-action-stats
178         type: nest
179         multi-attr: true
180         nested-attributes: dl-reload-act-stats
181
182       # TODO: fill in the attributes in between
183
184       -
185         name: rate-node-name
186         type: string
187         value: 168
188
189       # TODO: fill in the attributes in between
190
191       -
192         name: linecard-index
193         type: u32
194         value: 171
195
196   -
197     name: dl-dev-stats
198     subset-of: devlink
199     attributes:
200       -
201         name: reload-stats
202         type: nest
203       -
204         name: remote-reload-stats
205         type: nest
206   -
207     name: dl-reload-stats
208     subset-of: devlink
209     attributes:
210       -
211         name: reload-action-info
212         type: nest
213   -
214     name: dl-reload-act-info
215     subset-of: devlink
216     attributes:
217       -
218         name: reload-action
219         type: u8
220       -
221         name: reload-action-stats
222         type: nest
223   -
224     name: dl-reload-act-stats
225     subset-of: devlink
226     attributes:
227       -
228         name: reload-stats-entry
229         type: nest
230   -
231     name: dl-reload-stats-entry
232     subset-of: devlink
233     attributes:
234       -
235         name: reload-stats-limit
236         type: u8
237       -
238         name: reload-stats-value
239         type: u32
240   -
241     name: dl-info-version
242     subset-of: devlink
243     attributes:
244       -
245         name: info-version-name
246         type: string
247       -
248         name: info-version-value
249         type: string
250
251 operations:
252   enum-model: directional
253   list:
254     -
255       name: get
256       doc: Get devlink instances.
257       attribute-set: devlink
258       dont-validate:
259         - strict
260         - dump
261
262       do:
263         pre: devlink-nl-pre-doit
264         post: devlink-nl-post-doit
265         request:
266           value: 1
267           attributes: &dev-id-attrs
268             - bus-name
269             - dev-name
270         reply:  &get-reply
271           value: 3
272           attributes:
273             - bus-name
274             - dev-name
275             - reload-failed
276             - reload-action
277             - dev-stats
278       dump:
279         reply: *get-reply
280
281     -
282       name: port-get
283       doc: Get devlink port instances.
284       attribute-set: devlink
285       dont-validate:
286         - strict
287
288       do:
289         pre: devlink-nl-pre-doit-port
290         post: devlink-nl-post-doit
291         request:
292           value: 5
293           attributes: &port-id-attrs
294             - bus-name
295             - dev-name
296             - port-index
297         reply:
298           value: 7
299           attributes: *port-id-attrs
300       dump:
301         request:
302           attributes: *dev-id-attrs
303         reply:
304           value: 3  # due to a bug, port dump returns DEVLINK_CMD_NEW
305           attributes: *port-id-attrs
306
307       # TODO: fill in the operations in between
308
309     -
310       name: sb-get
311       doc: Get shared buffer instances.
312       attribute-set: devlink
313       dont-validate:
314         - strict
315
316       do:
317         pre: devlink-nl-pre-doit
318         post: devlink-nl-post-doit
319         request:
320           value: 11
321           attributes: &sb-id-attrs
322             - bus-name
323             - dev-name
324             - sb-index
325         reply: &sb-get-reply
326           value: 11
327           attributes: *sb-id-attrs
328       dump:
329         request:
330           attributes: *dev-id-attrs
331         reply: *sb-get-reply
332
333       # TODO: fill in the operations in between
334
335     -
336       name: sb-pool-get
337       doc: Get shared buffer pool instances.
338       attribute-set: devlink
339       dont-validate:
340         - strict
341
342       do:
343         pre: devlink-nl-pre-doit
344         post: devlink-nl-post-doit
345         request:
346           value: 15
347           attributes: &sb-pool-id-attrs
348             - bus-name
349             - dev-name
350             - sb-index
351             - sb-pool-index
352         reply: &sb-pool-get-reply
353           value: 15
354           attributes: *sb-pool-id-attrs
355       dump:
356         request:
357           attributes: *dev-id-attrs
358         reply: *sb-pool-get-reply
359
360       # TODO: fill in the operations in between
361
362     -
363       name: sb-port-pool-get
364       doc: Get shared buffer port-pool combinations and threshold.
365       attribute-set: devlink
366       dont-validate:
367         - strict
368
369       do:
370         pre: devlink-nl-pre-doit-port
371         post: devlink-nl-post-doit
372         request:
373           value: 19
374           attributes: &sb-port-pool-id-attrs
375             - bus-name
376             - dev-name
377             - port-index
378             - sb-index
379             - sb-pool-index
380         reply: &sb-port-pool-get-reply
381           value: 19
382           attributes: *sb-port-pool-id-attrs
383       dump:
384         request:
385           attributes: *dev-id-attrs
386         reply: *sb-port-pool-get-reply
387
388       # TODO: fill in the operations in between
389
390     -
391       name: sb-tc-pool-bind-get
392       doc: Get shared buffer port-TC to pool bindings and threshold.
393       attribute-set: devlink
394       dont-validate:
395         - strict
396
397       do:
398         pre: devlink-nl-pre-doit-port
399         post: devlink-nl-post-doit
400         request:
401           value: 23
402           attributes: &sb-tc-pool-bind-id-attrs
403             - bus-name
404             - dev-name
405             - port-index
406             - sb-index
407             - sb-pool-type
408             - sb-tc-index
409         reply: &sb-tc-pool-bind-get-reply
410           value: 23
411           attributes: *sb-tc-pool-bind-id-attrs
412       dump:
413         request:
414           attributes: *dev-id-attrs
415         reply: *sb-tc-pool-bind-get-reply
416
417       # TODO: fill in the operations in between
418
419     -
420       name: param-get
421       doc: Get param instances.
422       attribute-set: devlink
423       dont-validate:
424         - strict
425
426       do:
427         pre: devlink-nl-pre-doit
428         post: devlink-nl-post-doit
429         request:
430           value: 38
431           attributes: &param-id-attrs
432             - bus-name
433             - dev-name
434             - param-name
435         reply: &param-get-reply
436           value: 38
437           attributes: *param-id-attrs
438       dump:
439         request:
440           attributes: *dev-id-attrs
441         reply: *param-get-reply
442
443       # TODO: fill in the operations in between
444
445     -
446       name: region-get
447       doc: Get region instances.
448       attribute-set: devlink
449       dont-validate:
450         - strict
451
452       do:
453         pre: devlink-nl-pre-doit-port-optional
454         post: devlink-nl-post-doit
455         request:
456           value: 42
457           attributes: &region-id-attrs
458             - bus-name
459             - dev-name
460             - port-index
461             - region-name
462         reply: &region-get-reply
463           value: 42
464           attributes: *region-id-attrs
465       dump:
466         request:
467           attributes: *dev-id-attrs
468         reply: *region-get-reply
469
470       # TODO: fill in the operations in between
471
472     -
473       name: info-get
474       doc: Get device information, like driver name, hardware and firmware versions etc.
475       attribute-set: devlink
476       dont-validate:
477         - strict
478         - dump
479
480       do:
481         pre: devlink-nl-pre-doit
482         post: devlink-nl-post-doit
483         request:
484           value: 51
485           attributes: *dev-id-attrs
486         reply: &info-get-reply
487           value: 51
488           attributes:
489             - bus-name
490             - dev-name
491             - info-driver-name
492             - info-serial-number
493             - info-version-fixed
494             - info-version-running
495             - info-version-stored
496       dump:
497         reply: *info-get-reply
498
499     -
500       name: health-reporter-get
501       doc: Get health reporter instances.
502       attribute-set: devlink
503       dont-validate:
504         - strict
505
506       do:
507         pre: devlink-nl-pre-doit-port-optional
508         post: devlink-nl-post-doit
509         request:
510           attributes: &health-reporter-id-attrs
511             - bus-name
512             - dev-name
513             - port-index
514             - health-reporter-name
515         reply: &health-reporter-get-reply
516           attributes: *health-reporter-id-attrs
517       dump:
518         request:
519           attributes: *port-id-attrs
520         reply: *health-reporter-get-reply
521
522       # TODO: fill in the operations in between
523
524     -
525       name: trap-get
526       doc: Get trap instances.
527       attribute-set: devlink
528       dont-validate:
529         - strict
530
531       do:
532         pre: devlink-nl-pre-doit
533         post: devlink-nl-post-doit
534         request:
535           value: 61
536           attributes: &trap-id-attrs
537             - bus-name
538             - dev-name
539             - trap-name
540         reply: &trap-get-reply
541           value: 61
542           attributes: *trap-id-attrs
543       dump:
544         request:
545           attributes: *dev-id-attrs
546         reply: *trap-get-reply
547
548       # TODO: fill in the operations in between
549
550     -
551       name: trap-group-get
552       doc: Get trap group instances.
553       attribute-set: devlink
554       dont-validate:
555         - strict
556
557       do:
558         pre: devlink-nl-pre-doit
559         post: devlink-nl-post-doit
560         request:
561           value: 65
562           attributes: &trap-group-id-attrs
563             - bus-name
564             - dev-name
565             - trap-group-name
566         reply: &trap-group-get-reply
567           value: 65
568           attributes: *trap-group-id-attrs
569       dump:
570         request:
571           attributes: *dev-id-attrs
572         reply: *trap-group-get-reply
573
574       # TODO: fill in the operations in between
575
576     -
577       name: trap-policer-get
578       doc: Get trap policer instances.
579       attribute-set: devlink
580       dont-validate:
581         - strict
582
583       do:
584         pre: devlink-nl-pre-doit
585         post: devlink-nl-post-doit
586         request:
587           value: 69
588           attributes: &trap-policer-id-attrs
589             - bus-name
590             - dev-name
591             - trap-policer-id
592         reply: &trap-policer-get-reply
593           value: 69
594           attributes: *trap-policer-id-attrs
595       dump:
596         request:
597           attributes: *dev-id-attrs
598         reply: *trap-policer-get-reply
599
600       # TODO: fill in the operations in between
601
602     -
603       name: rate-get
604       doc: Get rate instances.
605       attribute-set: devlink
606       dont-validate:
607         - strict
608
609       do:
610         pre: devlink-nl-pre-doit
611         post: devlink-nl-post-doit
612         request:
613           value: 74
614           attributes: &rate-id-attrs
615             - bus-name
616             - dev-name
617             - port-index
618             - rate-node-name
619         reply: &rate-get-reply
620           value: 74
621           attributes: *rate-id-attrs
622       dump:
623         request:
624           attributes: *dev-id-attrs
625         reply: *rate-get-reply
626
627       # TODO: fill in the operations in between
628
629     -
630       name: linecard-get
631       doc: Get line card instances.
632       attribute-set: devlink
633       dont-validate:
634         - strict
635
636       do:
637         pre: devlink-nl-pre-doit
638         post: devlink-nl-post-doit
639         request:
640           value: 78
641           attributes: &linecard-id-attrs
642             - bus-name
643             - dev-name
644             - linecard-index
645         reply: &linecard-get-reply
646           value: 78
647           attributes: *linecard-id-attrs
648       dump:
649         request:
650           attributes: *dev-id-attrs
651         reply: *linecard-get-reply
652
653       # TODO: fill in the operations in between
654
655     -
656       name: selftests-get
657       doc: Get device selftest instances.
658       attribute-set: devlink
659       dont-validate:
660         - strict
661         - dump
662
663       do:
664         pre: devlink-nl-pre-doit
665         post: devlink-nl-post-doit
666         request:
667           value: 82
668           attributes: *dev-id-attrs
669         reply: &selftests-get-reply
670           value: 82
671           attributes: *dev-id-attrs
672       dump:
673         reply: *selftests-get-reply