Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / uapi / linux / netdev.h
blobe4be227d3ad6483b657a9150287c3aa5a89e0ed2
1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2 /* Do not edit directly, auto-generated from: */
3 /* Documentation/netlink/specs/netdev.yaml */
4 /* YNL-GEN uapi header */
6 #ifndef _UAPI_LINUX_NETDEV_H
7 #define _UAPI_LINUX_NETDEV_H
9 #define NETDEV_FAMILY_NAME "netdev"
10 #define NETDEV_FAMILY_VERSION 1
12 /**
13 * enum netdev_xdp_act
14 * @NETDEV_XDP_ACT_BASIC: XDP features set supported by all drivers
15 * (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX)
16 * @NETDEV_XDP_ACT_REDIRECT: The netdev supports XDP_REDIRECT
17 * @NETDEV_XDP_ACT_NDO_XMIT: This feature informs if netdev implements
18 * ndo_xdp_xmit callback.
19 * @NETDEV_XDP_ACT_XSK_ZEROCOPY: This feature informs if netdev supports AF_XDP
20 * in zero copy mode.
21 * @NETDEV_XDP_ACT_HW_OFFLOAD: This feature informs if netdev supports XDP hw
22 * offloading.
23 * @NETDEV_XDP_ACT_RX_SG: This feature informs if netdev implements non-linear
24 * XDP buffer support in the driver napi callback.
25 * @NETDEV_XDP_ACT_NDO_XMIT_SG: This feature informs if netdev implements
26 * non-linear XDP buffer support in ndo_xdp_xmit callback.
28 enum netdev_xdp_act {
29 NETDEV_XDP_ACT_BASIC = 1,
30 NETDEV_XDP_ACT_REDIRECT = 2,
31 NETDEV_XDP_ACT_NDO_XMIT = 4,
32 NETDEV_XDP_ACT_XSK_ZEROCOPY = 8,
33 NETDEV_XDP_ACT_HW_OFFLOAD = 16,
34 NETDEV_XDP_ACT_RX_SG = 32,
35 NETDEV_XDP_ACT_NDO_XMIT_SG = 64,
37 /* private: */
38 NETDEV_XDP_ACT_MASK = 127,
41 /**
42 * enum netdev_xdp_rx_metadata
43 * @NETDEV_XDP_RX_METADATA_TIMESTAMP: Device is capable of exposing receive HW
44 * timestamp via bpf_xdp_metadata_rx_timestamp().
45 * @NETDEV_XDP_RX_METADATA_HASH: Device is capable of exposing receive packet
46 * hash via bpf_xdp_metadata_rx_hash().
47 * @NETDEV_XDP_RX_METADATA_VLAN_TAG: Device is capable of exposing receive
48 * packet VLAN tag via bpf_xdp_metadata_rx_vlan_tag().
50 enum netdev_xdp_rx_metadata {
51 NETDEV_XDP_RX_METADATA_TIMESTAMP = 1,
52 NETDEV_XDP_RX_METADATA_HASH = 2,
53 NETDEV_XDP_RX_METADATA_VLAN_TAG = 4,
56 /**
57 * enum netdev_xsk_flags
58 * @NETDEV_XSK_FLAGS_TX_TIMESTAMP: HW timestamping egress packets is supported
59 * by the driver.
60 * @NETDEV_XSK_FLAGS_TX_CHECKSUM: L3 checksum HW offload is supported by the
61 * driver.
63 enum netdev_xsk_flags {
64 NETDEV_XSK_FLAGS_TX_TIMESTAMP = 1,
65 NETDEV_XSK_FLAGS_TX_CHECKSUM = 2,
68 enum netdev_queue_type {
69 NETDEV_QUEUE_TYPE_RX,
70 NETDEV_QUEUE_TYPE_TX,
73 enum netdev_qstats_scope {
74 NETDEV_QSTATS_SCOPE_QUEUE = 1,
77 enum {
78 NETDEV_A_DEV_IFINDEX = 1,
79 NETDEV_A_DEV_PAD,
80 NETDEV_A_DEV_XDP_FEATURES,
81 NETDEV_A_DEV_XDP_ZC_MAX_SEGS,
82 NETDEV_A_DEV_XDP_RX_METADATA_FEATURES,
83 NETDEV_A_DEV_XSK_FEATURES,
85 __NETDEV_A_DEV_MAX,
86 NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1)
89 enum {
90 NETDEV_A_PAGE_POOL_ID = 1,
91 NETDEV_A_PAGE_POOL_IFINDEX,
92 NETDEV_A_PAGE_POOL_NAPI_ID,
93 NETDEV_A_PAGE_POOL_INFLIGHT,
94 NETDEV_A_PAGE_POOL_INFLIGHT_MEM,
95 NETDEV_A_PAGE_POOL_DETACH_TIME,
96 NETDEV_A_PAGE_POOL_DMABUF,
98 __NETDEV_A_PAGE_POOL_MAX,
99 NETDEV_A_PAGE_POOL_MAX = (__NETDEV_A_PAGE_POOL_MAX - 1)
102 enum {
103 NETDEV_A_PAGE_POOL_STATS_INFO = 1,
104 NETDEV_A_PAGE_POOL_STATS_ALLOC_FAST = 8,
105 NETDEV_A_PAGE_POOL_STATS_ALLOC_SLOW,
106 NETDEV_A_PAGE_POOL_STATS_ALLOC_SLOW_HIGH_ORDER,
107 NETDEV_A_PAGE_POOL_STATS_ALLOC_EMPTY,
108 NETDEV_A_PAGE_POOL_STATS_ALLOC_REFILL,
109 NETDEV_A_PAGE_POOL_STATS_ALLOC_WAIVE,
110 NETDEV_A_PAGE_POOL_STATS_RECYCLE_CACHED,
111 NETDEV_A_PAGE_POOL_STATS_RECYCLE_CACHE_FULL,
112 NETDEV_A_PAGE_POOL_STATS_RECYCLE_RING,
113 NETDEV_A_PAGE_POOL_STATS_RECYCLE_RING_FULL,
114 NETDEV_A_PAGE_POOL_STATS_RECYCLE_RELEASED_REFCNT,
116 __NETDEV_A_PAGE_POOL_STATS_MAX,
117 NETDEV_A_PAGE_POOL_STATS_MAX = (__NETDEV_A_PAGE_POOL_STATS_MAX - 1)
120 enum {
121 NETDEV_A_NAPI_IFINDEX = 1,
122 NETDEV_A_NAPI_ID,
123 NETDEV_A_NAPI_IRQ,
124 NETDEV_A_NAPI_PID,
125 NETDEV_A_NAPI_DEFER_HARD_IRQS,
126 NETDEV_A_NAPI_GRO_FLUSH_TIMEOUT,
127 NETDEV_A_NAPI_IRQ_SUSPEND_TIMEOUT,
129 __NETDEV_A_NAPI_MAX,
130 NETDEV_A_NAPI_MAX = (__NETDEV_A_NAPI_MAX - 1)
133 enum {
134 NETDEV_A_QUEUE_ID = 1,
135 NETDEV_A_QUEUE_IFINDEX,
136 NETDEV_A_QUEUE_TYPE,
137 NETDEV_A_QUEUE_NAPI_ID,
138 NETDEV_A_QUEUE_DMABUF,
140 __NETDEV_A_QUEUE_MAX,
141 NETDEV_A_QUEUE_MAX = (__NETDEV_A_QUEUE_MAX - 1)
144 enum {
145 NETDEV_A_QSTATS_IFINDEX = 1,
146 NETDEV_A_QSTATS_QUEUE_TYPE,
147 NETDEV_A_QSTATS_QUEUE_ID,
148 NETDEV_A_QSTATS_SCOPE,
149 NETDEV_A_QSTATS_RX_PACKETS = 8,
150 NETDEV_A_QSTATS_RX_BYTES,
151 NETDEV_A_QSTATS_TX_PACKETS,
152 NETDEV_A_QSTATS_TX_BYTES,
153 NETDEV_A_QSTATS_RX_ALLOC_FAIL,
154 NETDEV_A_QSTATS_RX_HW_DROPS,
155 NETDEV_A_QSTATS_RX_HW_DROP_OVERRUNS,
156 NETDEV_A_QSTATS_RX_CSUM_COMPLETE,
157 NETDEV_A_QSTATS_RX_CSUM_UNNECESSARY,
158 NETDEV_A_QSTATS_RX_CSUM_NONE,
159 NETDEV_A_QSTATS_RX_CSUM_BAD,
160 NETDEV_A_QSTATS_RX_HW_GRO_PACKETS,
161 NETDEV_A_QSTATS_RX_HW_GRO_BYTES,
162 NETDEV_A_QSTATS_RX_HW_GRO_WIRE_PACKETS,
163 NETDEV_A_QSTATS_RX_HW_GRO_WIRE_BYTES,
164 NETDEV_A_QSTATS_RX_HW_DROP_RATELIMITS,
165 NETDEV_A_QSTATS_TX_HW_DROPS,
166 NETDEV_A_QSTATS_TX_HW_DROP_ERRORS,
167 NETDEV_A_QSTATS_TX_CSUM_NONE,
168 NETDEV_A_QSTATS_TX_NEEDS_CSUM,
169 NETDEV_A_QSTATS_TX_HW_GSO_PACKETS,
170 NETDEV_A_QSTATS_TX_HW_GSO_BYTES,
171 NETDEV_A_QSTATS_TX_HW_GSO_WIRE_PACKETS,
172 NETDEV_A_QSTATS_TX_HW_GSO_WIRE_BYTES,
173 NETDEV_A_QSTATS_TX_HW_DROP_RATELIMITS,
174 NETDEV_A_QSTATS_TX_STOP,
175 NETDEV_A_QSTATS_TX_WAKE,
177 __NETDEV_A_QSTATS_MAX,
178 NETDEV_A_QSTATS_MAX = (__NETDEV_A_QSTATS_MAX - 1)
181 enum {
182 NETDEV_A_DMABUF_IFINDEX = 1,
183 NETDEV_A_DMABUF_QUEUES,
184 NETDEV_A_DMABUF_FD,
185 NETDEV_A_DMABUF_ID,
187 __NETDEV_A_DMABUF_MAX,
188 NETDEV_A_DMABUF_MAX = (__NETDEV_A_DMABUF_MAX - 1)
191 enum {
192 NETDEV_CMD_DEV_GET = 1,
193 NETDEV_CMD_DEV_ADD_NTF,
194 NETDEV_CMD_DEV_DEL_NTF,
195 NETDEV_CMD_DEV_CHANGE_NTF,
196 NETDEV_CMD_PAGE_POOL_GET,
197 NETDEV_CMD_PAGE_POOL_ADD_NTF,
198 NETDEV_CMD_PAGE_POOL_DEL_NTF,
199 NETDEV_CMD_PAGE_POOL_CHANGE_NTF,
200 NETDEV_CMD_PAGE_POOL_STATS_GET,
201 NETDEV_CMD_QUEUE_GET,
202 NETDEV_CMD_NAPI_GET,
203 NETDEV_CMD_QSTATS_GET,
204 NETDEV_CMD_BIND_RX,
205 NETDEV_CMD_NAPI_SET,
207 __NETDEV_CMD_MAX,
208 NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1)
211 #define NETDEV_MCGRP_MGMT "mgmt"
212 #define NETDEV_MCGRP_PAGE_POOL "page-pool"
214 #endif /* _UAPI_LINUX_NETDEV_H */