GNU Linux-libre 6.6.34-gnu
[releases.git] / Documentation / netlink / specs / netdev.yaml
1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2
3 name: netdev
4
5 doc:
6   netdev configuration over generic netlink.
7
8 definitions:
9   -
10     type: flags
11     name: xdp-act
12     render-max: true
13     entries:
14       -
15         name: basic
16         doc:
17           XDP features set supported by all drivers
18           (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX)
19       -
20         name: redirect
21         doc:
22           The netdev supports XDP_REDIRECT
23       -
24         name: ndo-xmit
25         doc:
26           This feature informs if netdev implements ndo_xdp_xmit callback.
27       -
28         name: xsk-zerocopy
29         doc:
30           This feature informs if netdev supports AF_XDP in zero copy mode.
31       -
32         name: hw-offload
33         doc:
34          This feature informs if netdev supports XDP hw offloading.
35       -
36         name: rx-sg
37         doc:
38           This feature informs if netdev implements non-linear XDP buffer
39           support in the driver napi callback.
40       -
41         name: ndo-xmit-sg
42         doc:
43           This feature informs if netdev implements non-linear XDP buffer
44           support in ndo_xdp_xmit callback.
45
46 attribute-sets:
47   -
48     name: dev
49     attributes:
50       -
51         name: ifindex
52         doc: netdev ifindex
53         type: u32
54         checks:
55           min: 1
56       -
57         name: pad
58         type: pad
59       -
60         name: xdp-features
61         doc: Bitmask of enabled xdp-features.
62         type: u64
63         enum: xdp-act
64         enum-as-flags: true
65       -
66         name: xdp-zc-max-segs
67         doc: max fragment count supported by ZC driver
68         type: u32
69         checks:
70           min: 1
71
72 operations:
73   list:
74     -
75       name: dev-get
76       doc: Get / dump information about a netdev.
77       attribute-set: dev
78       do:
79         request:
80           attributes:
81             - ifindex
82         reply: &dev-all
83           attributes:
84             - ifindex
85             - xdp-features
86             - xdp-zc-max-segs
87       dump:
88         reply: *dev-all
89     -
90       name: dev-add-ntf
91       doc: Notification about device appearing.
92       notify: dev-get
93       mcgrp: mgmt
94     -
95       name: dev-del-ntf
96       doc: Notification about device disappearing.
97       notify: dev-get
98       mcgrp: mgmt
99     -
100       name: dev-change-ntf
101       doc: Notification about device configuration being changed.
102       notify: dev-get
103       mcgrp: mgmt
104
105 mcast-groups:
106   list:
107     -
108       name: mgmt