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.
172 doc: ID of the dmabuf this page-pool is attached to.
183 name: page-pool-stats
185 Page pool statistics, see docs for struct page_pool_stats
186 for information about individual statistics.
190 doc: Page pool identifying information.
192 nested-attributes: page-pool-info
196 value: 8 # reserve some attr ids in case we need more metadata later
201 name: alloc-slow-high-order
216 name: recycle-cache-full
222 name: recycle-ring-full
225 name: recycle-released-refcnt
233 doc: ifindex of the netdevice to which NAPI instance belongs.
239 doc: ID of the NAPI instance.
243 doc: The associated interrupt vector number for the napi
247 doc: PID of the napi thread, if NAPI is configured to operate in
248 threaded mode. If NAPI is not in threaded mode (i.e. uses normal
249 softirq context), the attribute will be absent.
252 name: defer-hard-irqs
253 doc: The number of consecutive empty polls before IRQ deferral ends
254 and hardware IRQs are re-enabled.
259 name: gro-flush-timeout
260 doc: The timeout, in nanoseconds, of when to trigger the NAPI watchdog
261 timer which schedules NAPI processing. Additionally, a non-zero
262 value will also prevent GRO from flushing recent super-frames at
263 the end of a NAPI cycle. This may add receive latency in exchange
264 for reducing the number of frames processed by the network stack.
267 name: irq-suspend-timeout
268 doc: The timeout, in nanoseconds, of how long to suspend irq
269 processing, if event polling finds events
276 doc: Queue index; most queue types are indexed like a C array, with
277 indexes starting at 0 and ending at queue count - 1. Queue indexes
278 are scoped to an interface and queue type.
282 doc: ifindex of the netdevice to which the queue belongs.
288 doc: Queue type as rx, tx. Each queue type defines a separate ID space.
293 doc: ID of the NAPI instance which services this queue.
297 doc: ID of the dmabuf attached to this queue, if any.
303 Get device statistics, scoped to a device or a queue.
304 These statistics extend (and partially duplicate) statistics available
305 in struct rtnl_link_stats64.
306 Value of the `scope` attribute determines how statistics are
307 aggregated. When aggregated for the entire device the statistics
308 represent the total number of events since last explicit reset of
309 the device (i.e. not a reconfiguration like changing queue count).
310 When reported per-queue, however, the statistics may not add
311 up to the total number of events, will only be reported for currently
312 active objects, and will likely report the number of events since last
317 doc: ifindex of the netdevice to which stats belong.
323 doc: Queue type as rx, tx, for queue-id.
328 doc: Queue ID, if stats are scoped to a single queue instance.
333 What object type should be used to iterate over the stats.
339 Number of wire packets successfully received and passed to the stack.
340 For drivers supporting XDP, XDP is considered the first layer
341 of the stack, so packets consumed by XDP are still counted here.
343 value: 8 # reserve some attr ids in case we need more metadata later
346 doc: Successfully received bytes, see `rx-packets`.
351 Number of wire packets successfully sent. Packet is considered to be
352 successfully sent once it is in device memory (usually this means
353 the device has issued a DMA completion for the packet).
357 doc: Successfully sent bytes, see `tx-packets`.
362 Number of times skb or buffer allocation failed on the Rx datapath.
363 Allocation failure may, or may not result in a packet drop, depending
364 on driver implementation and whether system recovers quickly.
369 Number of all packets which entered the device, but never left it,
370 including but not limited to: packets dropped due to lack of buffer
371 space, processing errors, explicit or implicit policies and packet
375 name: rx-hw-drop-overruns
377 Number of packets dropped due to transient lack of resources, such as
378 buffer space, host descriptors etc.
381 name: rx-csum-complete
382 doc: Number of packets that were marked as CHECKSUM_COMPLETE.
385 name: rx-csum-unnecessary
386 doc: Number of packets that were marked as CHECKSUM_UNNECESSARY.
390 doc: Number of packets that were not checksummed by device.
395 Number of packets with bad checksum. The packets are not discarded,
396 but still delivered to the stack.
399 name: rx-hw-gro-packets
401 Number of packets that were coalesced from smaller packets by the device.
402 Counts only packets coalesced with the HW-GRO netdevice feature,
403 LRO-coalesced packets are not counted.
406 name: rx-hw-gro-bytes
407 doc: See `rx-hw-gro-packets`.
410 name: rx-hw-gro-wire-packets
412 Number of packets that were coalesced to bigger packetss with the HW-GRO
413 netdevice feature. LRO-coalesced packets are not counted.
416 name: rx-hw-gro-wire-bytes
417 doc: See `rx-hw-gro-wire-packets`.
420 name: rx-hw-drop-ratelimits
422 Number of the packets dropped by the device due to the received
423 packets bitrate exceeding the device rate limit.
428 Number of packets that arrived at the device but never left it,
429 encompassing packets dropped for reasons such as processing errors, as
430 well as those affected by explicitly defined policies and packet
434 name: tx-hw-drop-errors
435 doc: Number of packets dropped because they were invalid or malformed.
440 Number of packets that did not require the device to calculate the
446 Number of packets that required the device to calculate the checksum.
449 name: tx-hw-gso-packets
451 Number of packets that necessitated segmentation into smaller packets
455 name: tx-hw-gso-bytes
456 doc: See `tx-hw-gso-packets`.
459 name: tx-hw-gso-wire-packets
461 Number of wire-sized packets generated by processing
465 name: tx-hw-gso-wire-bytes
466 doc: See `tx-hw-gso-wire-packets`.
469 name: tx-hw-drop-ratelimits
471 Number of the packets dropped by the device due to the transmit
472 packets bitrate exceeding the device rate limit.
477 Number of times driver paused accepting new tx packets
478 from the stack to this queue, because the queue was full.
479 Note that if BQL is supported and enabled on the device
480 the networking stack will avoid queuing a lot of data at once.
485 Number of times driver re-started accepting send
486 requests to this queue from the stack.
501 doc: netdev ifindex to bind the dmabuf to.
507 doc: receive queues to bind the dmabuf to.
509 nested-attributes: queue-id
513 doc: dmabuf file descriptor to bind.
517 doc: id of the dmabuf binding
526 doc: Get / dump information about a netdev.
537 - xdp-rx-metadata-features
543 doc: Notification about device appearing.
548 doc: Notification about device disappearing.
553 doc: Notification about device configuration being changed.
559 Get / dump information about Page Pools.
560 (Only Page Pools associated with a net_device can be listed.)
561 attribute-set: page-pool
577 config-cond: page-pool
579 name: page-pool-add-ntf
580 doc: Notification about page pool appearing.
581 notify: page-pool-get
583 config-cond: page-pool
585 name: page-pool-del-ntf
586 doc: Notification about page pool disappearing.
587 notify: page-pool-get
589 config-cond: page-pool
591 name: page-pool-change-ntf
592 doc: Notification about page pool configuration being changed.
593 notify: page-pool-get
595 config-cond: page-pool
597 name: page-pool-stats-get
598 doc: Get page pool statistics.
599 attribute-set: page-pool-stats
604 reply: &pp-stats-reply
609 - alloc-slow-high-order
617 - recycle-released-refcnt
619 reply: *pp-stats-reply
620 config-cond: page-pool-stats
623 doc: Get queue information from the kernel.
624 Only configured queues will be reported (as opposed to all available
647 doc: Get information about NAPI instances configured on the system.
661 - irq-suspend-timeout
670 Get / dump fine grained statistics. Which statistics are reported
671 depends on the device and the driver, and whether the driver stores
672 software counters per-queue.
673 attribute-set: qstats
690 doc: Bind dmabuf to netdev
691 attribute-set: dmabuf
692 flags: [ admin-perm ]
704 doc: Set configurable NAPI instance settings.
706 flags: [ admin-perm ]
713 - irq-suspend-timeout
716 headers: [ "linux/list.h"]
717 sock-priv: struct list_head