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