1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) 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    render-max: true
13    entries:
14      -
15        name: basic
16        doc:
17          XDP feautues 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
46attribute-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
72operations:
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      dump:
87        reply: *dev-all
88    -
89      name: dev-add-ntf
90      doc: Notification about device appearing.
91      notify: dev-get
92      mcgrp: mgmt
93    -
94      name: dev-del-ntf
95      doc: Notification about device disappearing.
96      notify: dev-get
97      mcgrp: mgmt
98    -
99      name: dev-change-ntf
100      doc: Notification about device configuration being changed.
101      notify: dev-get
102      mcgrp: mgmt
103
104mcast-groups:
105  list:
106    -
107      name: mgmt
108