1# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2
3name: netdev
4
5doc:
6  netdev configuration over generic netlink.
7
8definitions:
9  -
10    type: flags
11    name: xdp-act
12    entries:
13      -
14        name: basic
15        doc:
16          XDP feautues set supported by all drivers
17          (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX)
18      -
19        name: redirect
20        doc:
21          The netdev supports XDP_REDIRECT
22      -
23        name: ndo-xmit
24        doc:
25          This feature informs if netdev implements ndo_xdp_xmit callback.
26      -
27        name: xsk-zerocopy
28        doc:
29          This feature informs if netdev supports AF_XDP in zero copy mode.
30      -
31        name: hw-offload
32        doc:
33         This feature informs if netdev supports XDP hw offloading.
34      -
35        name: rx-sg
36        doc:
37          This feature informs if netdev implements non-linear XDP buffer
38          support in the driver napi callback.
39      -
40        name: ndo-xmit-sg
41        doc:
42          This feature informs if netdev implements non-linear XDP buffer
43          support in ndo_xdp_xmit callback.
44
45attribute-sets:
46  -
47    name: dev
48    attributes:
49      -
50        name: ifindex
51        doc: netdev ifindex
52        type: u32
53        checks:
54          min: 1
55      -
56        name: pad
57        type: pad
58      -
59        name: xdp-features
60        doc: Bitmask of enabled xdp-features.
61        type: u64
62        enum: xdp-act
63        enum-as-flags: true
64
65operations:
66  list:
67    -
68      name: dev-get
69      doc: Get / dump information about a netdev.
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