1# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2
3name: ethtool
4
5protocol: genetlink-legacy
6
7doc: Partial family for Ethtool Netlink.
8
9attribute-sets:
10  -
11    name: header
12    attributes:
13      -
14        name: dev-index
15        type: u32
16      -
17        name: dev-name
18        type: string
19      -
20        name: flags
21        type: u32
22
23  -
24    name: bitset-bit
25    attributes:
26      -
27        name: index
28        type: u32
29      -
30        name: name
31        type: string
32      -
33        name: value
34        type: flag
35  -
36    name: bitset-bits
37    attributes:
38      -
39        name: bit
40        type: nest
41        nested-attributes: bitset-bit
42  -
43    name: bitset
44    attributes:
45      -
46        name: nomask
47        type: flag
48      -
49        name: size
50        type: u32
51      -
52        name: bits
53        type: nest
54        nested-attributes: bitset-bits
55
56  -
57    name: string
58    attributes:
59      -
60        name: index
61        type: u32
62      -
63        name: value
64        type: string
65  -
66    name: strings
67    attributes:
68      -
69        name: string
70        type: nest
71        multi-attr: true
72        nested-attributes: string
73  -
74    name: stringset
75    attributes:
76      -
77        name: id
78        type: u32
79      -
80        name: count
81        type: u32
82      -
83        name: strings
84        type: nest
85        multi-attr: true
86        nested-attributes: strings
87  -
88    name: stringsets
89    attributes:
90      -
91        name: stringset
92        type: nest
93        multi-attr: true
94        nested-attributes: stringset
95  -
96    name: strset
97    attributes:
98      -
99        name: header
100        type: nest
101        nested-attributes: header
102      -
103        name: stringsets
104        type: nest
105        nested-attributes: stringsets
106      -
107        name: counts-only
108        type: flag
109
110  -
111    name: privflags
112    attributes:
113      -
114        name: header
115        type: nest
116        nested-attributes: header
117      -
118        name: flags
119        type: nest
120        nested-attributes: bitset
121
122  -
123    name: rings
124    attributes:
125      -
126        name: header
127        type: nest
128        nested-attributes: header
129      -
130        name: rx-max
131        type: u32
132      -
133        name: rx-mini-max
134        type: u32
135      -
136        name: rx-jumbo-max
137        type: u32
138      -
139        name: tx-max
140        type: u32
141      -
142        name: rx
143        type: u32
144      -
145        name: rx-mini
146        type: u32
147      -
148        name: rx-jumbo
149        type: u32
150      -
151        name: tx
152        type: u32
153      -
154        name: rx-buf-len
155        type: u32
156      -
157        name: tcp-data-split
158        type: u8
159      -
160        name: cqe-size
161        type: u32
162      -
163        name: tx-push
164        type: u8
165      -
166        name: rx-push
167        type: u8
168
169  -
170    name: mm-stat
171    attributes:
172      -
173        name: pad
174        type: pad
175      -
176        name: reassembly-errors
177        type: u64
178      -
179        name: smd-errors
180        type: u64
181      -
182        name: reassembly-ok
183        type: u64
184      -
185        name: rx-frag-count
186        type: u64
187      -
188        name: tx-frag-count
189        type: u64
190      -
191        name: hold-count
192        type: u64
193  -
194    name: mm
195    attributes:
196      -
197        name: header
198        type: nest
199        nested-attributes: header
200      -
201        name: pmac-enabled
202        type: u8
203      -
204        name: tx-enabled
205        type: u8
206      -
207        name: tx-active
208        type: u8
209      -
210        name: tx-min-frag-size
211        type: u32
212      -
213        name: tx-min-frag-size
214        type: u32
215      -
216        name: verify-enabled
217        type: u8
218      -
219        name: verify-status
220        type: u8
221      -
222        name: verify-time
223        type: u32
224      -
225        name: max-verify-time
226        type: u32
227      -
228        name: stats
229        type: nest
230        nested-attributes: mm-stat
231
232operations:
233  enum-model: directional
234  list:
235    -
236      name: strset-get
237      doc: Get string set from the kernel.
238
239      attribute-set: strset
240
241      do: &strset-get-op
242        request:
243          attributes:
244            - header
245            - stringsets
246            - counts-only
247        reply:
248          attributes:
249            - header
250            - stringsets
251      dump: *strset-get-op
252
253    # TODO: fill in the requests in between
254
255    -
256      name: privflags-get
257      doc: Get device private flags.
258
259      attribute-set: privflags
260
261      do: &privflag-get-op
262        request:
263          value: 13
264          attributes:
265            - header
266        reply:
267          value: 14
268          attributes:
269            - header
270            - flags
271      dump: *privflag-get-op
272    -
273      name: privflags-set
274      doc: Set device private flags.
275
276      attribute-set: privflags
277
278      do:
279        request:
280          attributes:
281            - header
282            - flags
283    -
284      name: privflags-ntf
285      doc: Notification for change in device private flags.
286      notify: privflags-get
287
288    -
289      name: rings-get
290      doc: Get ring params.
291
292      attribute-set: rings
293
294      do: &ring-get-op
295        request:
296          attributes:
297            - header
298        reply:
299          attributes:
300            - header
301            - rx-max
302            - rx-mini-max
303            - rx-jumbo-max
304            - tx-max
305            - rx
306            - rx-mini
307            - rx-jumbo
308            - tx
309            - rx-buf-len
310            - tcp-data-split
311            - cqe-size
312            - tx-push
313            - rx-push
314      dump: *ring-get-op
315    -
316      name: rings-set
317      doc: Set ring params.
318
319      attribute-set: rings
320
321      do:
322        request:
323          attributes:
324            - header
325            - rx
326            - rx-mini
327            - rx-jumbo
328            - tx
329            - rx-buf-len
330            - tcp-data-split
331            - cqe-size
332            - tx-push
333            - rx-push
334    -
335      name: rings-ntf
336      doc: Notification for change in ring params.
337      notify: rings-get
338
339    # TODO: fill in the requests in between
340
341    -
342      name: mm-get
343      doc: Get MAC Merge configuration and state
344
345      attribute-set: mm
346
347      do: &mm-get-op
348        request:
349          value: 42
350          attributes:
351            - header
352        reply:
353          value: 42
354          attributes:
355            - header
356            - pmac-enabled
357            - tx-enabled
358            - tx-active
359            - tx-min-frag-size
360            - rx-min-frag-size
361            - verify-enabled
362            - verify-time
363            - max-verify-time
364            - stats
365      dump: *mm-get-op
366    -
367      name: mm-set
368      doc: Set MAC Merge configuration
369
370      attribute-set: mm
371
372      do:
373        request:
374          attributes:
375            - header
376            - verify-enabled
377            - verify-time
378            - tx-enabled
379            - pmac-enabled
380            - tx-min-frag-size
381    -
382      name: mm-ntf
383      doc: Notification for change in MAC Merge configuration.
384      notify: mm-get
385