1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
6 netdev configuration over generic netlink.
17 XDP features set supported by all drivers
18 (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX)
22 The netdev supports XDP_REDIRECT
26 This feature informs if netdev implements ndo_xdp_xmit callback.
30 This feature informs if netdev supports AF_XDP in zero copy mode.
34 This feature informs if netdev supports XDP hw offloading.
38 This feature informs if netdev implements non-linear XDP buffer
39 support in the driver napi callback.
43 This feature informs if netdev implements non-linear XDP buffer
44 support in ndo_xdp_xmit callback.
52 Device is capable of exposing receive HW timestamp via bpf_xdp_metadata_rx_timestamp().
56 Device is capable of exposing receive packet hash via bpf_xdp_metadata_rx_hash().
60 Device is capable of exposing receive packet VLAN tag via bpf_xdp_metadata_rx_vlan_tag().
68 HW timestamping egress packets is supported by the driver.
72 L3 checksum HW offload is supported by the driver.
97 doc: Bitmask of enabled xdp-features.
101 name: xdp-zc-max-segs
102 doc: max fragment count supported by ZC driver
107 name: xdp-rx-metadata-features
108 doc: Bitmask of supported XDP receive metadata features.
109 See Documentation/networking/xdp-rx-metadata.rst for more details.
111 enum: xdp-rx-metadata
114 doc: Bitmask of enabled AF_XDP features.
122 doc: Unique ID of a Page Pool instance.
130 ifindex of the netdev to which the pool belongs.
131 May be reported as 0 if the page pool was allocated for a netdev
132 which got destroyed already (page pools may outlast their netdevs
133 because they wait for all memory to be returned).
140 doc: Id of NAPI using this Page Pool instance.
149 Number of outstanding references to this page pool (allocated
150 but yet to be freed pages). Allocated pages may be held in
151 socket receive queues, driver receive ring, page pool recycling
152 ring, the page pool cache, etc.
157 Amount of memory held by inflight pages.
162 Seconds in CLOCK_BOOTTIME of when Page Pool was detached by
163 the driver. Once detached Page Pool can no longer be used to
165 Page Pools wait for all the memory allocated from them to be freed
166 before truly disappearing. "Detached" Page Pools cannot be
167 "re-attached", they are just waiting to disappear.
168 Attribute is absent if Page Pool has not been detached, and
169 can still be used to allocate new memory.
179 name: page-pool-stats
181 Page pool statistics, see docs for struct page_pool_stats
182 for information about individual statistics.
186 doc: Page pool identifying information.
188 nested-attributes: page-pool-info
192 value: 8 # reserve some attr ids in case we need more metadata later
197 name: alloc-slow-high-order
212 name: recycle-cache-full
218 name: recycle-ring-full
221 name: recycle-released-refcnt
229 doc: ifindex of the netdevice to which NAPI instance belongs.
235 doc: ID of the NAPI instance.
239 doc: The associated interrupt vector number for the napi
243 doc: PID of the napi thread, if NAPI is configured to operate in
244 threaded mode. If NAPI is not in threaded mode (i.e. uses normal
245 softirq context), the attribute will be absent.
252 doc: Queue index; most queue types are indexed like a C array, with
253 indexes starting at 0 and ending at queue count - 1. Queue indexes
254 are scoped to an interface and queue type.
258 doc: ifindex of the netdevice to which the queue belongs.
264 doc: Queue type as rx, tx. Each queue type defines a separate ID space.
269 doc: ID of the NAPI instance which services this queue.
275 Get device statistics, scoped to a device or a queue.
276 These statistics extend (and partially duplicate) statistics available
277 in struct rtnl_link_stats64.
278 Value of the `scope` attribute determines how statistics are
279 aggregated. When aggregated for the entire device the statistics
280 represent the total number of events since last explicit reset of
281 the device (i.e. not a reconfiguration like changing queue count).
282 When reported per-queue, however, the statistics may not add
283 up to the total number of events, will only be reported for currently
284 active objects, and will likely report the number of events since last
289 doc: ifindex of the netdevice to which stats belong.
295 doc: Queue type as rx, tx, for queue-id.
300 doc: Queue ID, if stats are scoped to a single queue instance.
305 What object type should be used to iterate over the stats.
311 Number of wire packets successfully received and passed to the stack.
312 For drivers supporting XDP, XDP is considered the first layer
313 of the stack, so packets consumed by XDP are still counted here.
315 value: 8 # reserve some attr ids in case we need more metadata later
318 doc: Successfully received bytes, see `rx-packets`.
323 Number of wire packets successfully sent. Packet is considered to be
324 successfully sent once it is in device memory (usually this means
325 the device has issued a DMA completion for the packet).
329 doc: Successfully sent bytes, see `tx-packets`.
334 Number of times skb or buffer allocation failed on the Rx datapath.
335 Allocation failure may, or may not result in a packet drop, depending
336 on driver implementation and whether system recovers quickly.
343 doc: Get / dump information about a netdev.
354 - xdp-rx-metadata-features
360 doc: Notification about device appearing.
365 doc: Notification about device disappearing.
370 doc: Notification about device configuration being changed.
376 Get / dump information about Page Pools.
377 (Only Page Pools associated with a net_device can be listed.)
378 attribute-set: page-pool
393 config-cond: page-pool
395 name: page-pool-add-ntf
396 doc: Notification about page pool appearing.
397 notify: page-pool-get
399 config-cond: page-pool
401 name: page-pool-del-ntf
402 doc: Notification about page pool disappearing.
403 notify: page-pool-get
405 config-cond: page-pool
407 name: page-pool-change-ntf
408 doc: Notification about page pool configuration being changed.
409 notify: page-pool-get
411 config-cond: page-pool
413 name: page-pool-stats-get
414 doc: Get page pool statistics.
415 attribute-set: page-pool-stats
420 reply: &pp-stats-reply
425 - alloc-slow-high-order
433 - recycle-released-refcnt
435 reply: *pp-stats-reply
436 config-cond: page-pool-stats
439 doc: Get queue information from the kernel.
440 Only configured queues will be reported (as opposed to all available
462 doc: Get information about NAPI instances configured on the system.
482 Get / dump fine grained statistics. Which statistics are reported
483 depends on the device and the driver, and whether the driver stores
484 software counters per-queue.
485 attribute-set: qstats