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        checks:
52          min: 1
53      -
54        name: pad
55        type: pad
56      -
57        name: xdp-features
58        doc: Bitmask of enabled xdp-features.
59        type: u64
60        enum: xdp-act
61        enum-as-flags: true
62
63operations:
64  list:
65    -
66      name: dev-get
67      doc: Get / dump information about a netdev.
68      attribute-set: dev
69      do:
70        request:
71          attributes:
72            - ifindex
73        reply: &dev-all
74          attributes:
75            - ifindex
76            - xdp-features
77      dump:
78        reply: *dev-all
79    -
80      name: dev-add-ntf
81      doc: Notification about device appearing.
82      notify: dev-get
83      mcgrp: mgmt
84    -
85      name: dev-del-ntf
86      doc: Notification about device disappearing.
87      notify: dev-get
88      mcgrp: mgmt
89    -
90      name: dev-change-ntf
91      doc: Notification about device configuration being changed.
92      notify: dev-get
93      mcgrp: mgmt
94
95mcast-groups:
96  list:
97    -
98      name: mgmt
99