Logo

The Linux Kernel

6.8.0

Quick search

Contents

  • A guide to the Kernel Development Process
  • Submitting patches: the essential guide to getting your code into the kernel
  • Code of conduct
  • Kernel Maintainer Handbook
  • All development-process docs
  • Core API Documentation
  • Driver implementer's API guide
  • Kernel subsystem documentation
    • Core subsystems
    • Human interfaces
    • Networking interfaces
      • Networking
      • NetLabel
      • InfiniBand
      • ISDN
      • MHI
    • Storage interfaces
  • Locking in the kernel
  • Linux kernel licensing rules
  • How to write kernel documentation
  • Development tools for the kernel
  • Kernel Testing Guide
  • Kernel Hacking Guides
  • Linux Tracing Technologies
  • fault-injection
  • Kernel Livepatching
  • Rust
  • The Linux kernel user's and administrator's guide
  • The kernel build system
  • Reporting issues
  • User-space tools
  • The Linux kernel user-space API guide
  • The Linux kernel firmware guide
  • Open Firmware and Devicetree
  • CPU Architectures
  • Unsorted Documentation
  • Reliability, Availability and Serviceability features
  • Translations

This Page

  • Show Source

Family netdev netlink specification¶

Contents

  • Family netdev netlink specification

    • Summary

    • Operations

      • dev-get

      • dev-add-ntf

      • dev-del-ntf

      • dev-change-ntf

      • page-pool-get

      • page-pool-add-ntf

      • page-pool-del-ntf

      • page-pool-change-ntf

      • page-pool-stats-get

      • queue-get

      • napi-get

    • Multicast groups

    • Definitions

      • xdp-act

      • xdp-rx-metadata

      • xsk-flags

      • queue-type

    • Attribute sets

      • dev

        • ifindex (u32)

        • pad (pad)

        • xdp-features (u64)

        • xdp-zc-max-segs (u32)

        • xdp-rx-metadata-features (u64)

        • xsk-features (u64)

      • page-pool

        • id (uint)

        • ifindex (u32)

        • napi-id (uint)

        • inflight (uint)

        • inflight-mem (uint)

        • detach-time (uint)

      • page-pool-info

        • id

        • ifindex

      • page-pool-stats

        • info (nest)

        • alloc-fast (uint)

        • alloc-slow (uint)

        • alloc-slow-high-order (uint)

        • alloc-empty (uint)

        • alloc-refill (uint)

        • alloc-waive (uint)

        • recycle-cached (uint)

        • recycle-cache-full (uint)

        • recycle-ring (uint)

        • recycle-ring-full (uint)

        • recycle-released-refcnt (uint)

      • napi

        • ifindex (u32)

        • id (u32)

        • irq (u32)

        • pid (u32)

      • queue

        • id (u32)

        • ifindex (u32)

        • type (u32)

        • napi-id (u32)

Summary¶

netdev configuration over generic netlink.

Operations¶

dev-get¶

Get / dump information about a netdev.

attribute-set

dev

do
request
attributes

[ifindex]

reply
attributes

[ifindex, xdp-features, xdp-zc-max-segs, xdp-rx-metadata-features, xsk-features]

dump
reply
attributes

[ifindex, xdp-features, xdp-zc-max-segs, xdp-rx-metadata-features, xsk-features]

dev-add-ntf¶

Notification about device appearing.

notify

dev-get

mcgrp

mgmt

dev-del-ntf¶

Notification about device disappearing.

notify

dev-get

mcgrp

mgmt

dev-change-ntf¶

Notification about device configuration being changed.

notify

dev-get

mcgrp

mgmt

page-pool-get¶

Get / dump information about Page Pools.(Only Page Pools associated with a net_device can be listed.)

attribute-set

page-pool

config-cond

page-pool

do
request
attributes

[id]

reply
attributes

[id, ifindex, napi-id, inflight, inflight-mem, detach-time]

dump
reply
attributes

[id, ifindex, napi-id, inflight, inflight-mem, detach-time]

page-pool-add-ntf¶

Notification about page pool appearing.

notify

page-pool-get

mcgrp

page-pool

config-cond

page-pool

page-pool-del-ntf¶

Notification about page pool disappearing.

notify

page-pool-get

mcgrp

page-pool

config-cond

page-pool

page-pool-change-ntf¶

Notification about page pool configuration being changed.

notify

page-pool-get

mcgrp

page-pool

config-cond

page-pool

page-pool-stats-get¶

Get page pool statistics.

attribute-set

page-pool-stats

config-cond

page-pool-stats

do
request
attributes

[info]

reply
attributes

[info, alloc-fast, alloc-slow, alloc-slow-high-order, alloc-empty, alloc-refill, alloc-waive, recycle-cached, recycle-cache-full, recycle-ring, recycle-ring-full, recycle-released-refcnt]

dump
reply
attributes

[info, alloc-fast, alloc-slow, alloc-slow-high-order, alloc-empty, alloc-refill, alloc-waive, recycle-cached, recycle-cache-full, recycle-ring, recycle-ring-full, recycle-released-refcnt]

queue-get¶

Get queue information from the kernel. Only configured queues will be reported (as opposed to all available hardware queues).

attribute-set

queue

do
request
attributes

[ifindex, type, id]

reply
attributes

[id, type, napi-id, ifindex]

dump
request
attributes

[ifindex]

reply
attributes

[id, type, napi-id, ifindex]

napi-get¶

Get information about NAPI instances configured on the system.

attribute-set

napi

do
request
attributes

[id]

reply
attributes

[id, ifindex, irq, pid]

dump
request
attributes

[ifindex]

reply
attributes

[id, ifindex, irq, pid]

Multicast groups¶

  • mgmt

  • page-pool

Definitions¶

xdp-act¶

type

flags

entries
basic

XDP features set supported by all drivers (XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX)

redirect

The netdev supports XDP_REDIRECT

ndo-xmit

This feature informs if netdev implements ndo_xdp_xmit callback.

xsk-zerocopy

This feature informs if netdev supports AF_XDP in zero copy mode.

hw-offload

This feature informs if netdev supports XDP hw offloading.

rx-sg

This feature informs if netdev implements non-linear XDP buffer support in the driver napi callback.

ndo-xmit-sg

This feature informs if netdev implements non-linear XDP buffer support in ndo_xdp_xmit callback.

xdp-rx-metadata¶

type

flags

entries
timestamp

Device is capable of exposing receive HW timestamp via bpf_xdp_metadata_rx_timestamp().

hash

Device is capable of exposing receive packet hash via bpf_xdp_metadata_rx_hash().

vlan-tag

Device is capable of exposing receive packet VLAN tag via bpf_xdp_metadata_rx_vlan_tag().

xsk-flags¶

type

flags

entries
tx-timestamp

HW timestamping egress packets is supported by the driver.

tx-checksum

L3 checksum HW offload is supported by the driver.

queue-type¶

type

enum

entries
  • rx

  • tx

Attribute sets¶

dev¶

ifindex (u32)¶

doc

netdev ifindex

pad (pad)¶

xdp-features (u64)¶

doc

Bitmask of enabled xdp-features.

enum

xdp-act

xdp-zc-max-segs (u32)¶

doc

max fragment count supported by ZC driver

xdp-rx-metadata-features (u64)¶

doc

Bitmask of supported XDP receive metadata features. See XDP RX Metadata for more details.

enum

xdp-rx-metadata

xsk-features (u64)¶

doc

Bitmask of enabled AF_XDP features.

enum

xsk-flags

page-pool¶

id (uint)¶

doc

Unique ID of a Page Pool instance.

ifindex (u32)¶

doc

ifindex of the netdev to which the pool belongs.May be reported as 0 if the page pool was allocated for a netdevwhich got destroyed already (page pools may outlast their netdevsbecause they wait for all memory to be returned).

napi-id (uint)¶

doc

Id of NAPI using this Page Pool instance.

inflight (uint)¶

doc

Number of outstanding references to this page pool (allocatedbut yet to be freed pages). Allocated pages may be held insocket receive queues, driver receive ring, page pool recyclingring, the page pool cache, etc.

inflight-mem (uint)¶

doc

Amount of memory held by inflight pages.

detach-time (uint)¶

doc

Seconds in CLOCK_BOOTTIME of when Page Pool was detached bythe driver. Once detached Page Pool can no longer be used toallocate memory.Page Pools wait for all the memory allocated from them to be freedbefore truly disappearing. "Detached" Page Pools cannot be"re-attached", they are just waiting to disappear.Attribute is absent if Page Pool has not been detached, andcan still be used to allocate new memory.

page-pool-info¶

id¶

ifindex¶

page-pool-stats¶

info (nest)¶

doc

Page pool identifying information.

nested-attributes

page-pool-info

alloc-fast (uint)¶

value

8

alloc-slow (uint)¶

alloc-slow-high-order (uint)¶

alloc-empty (uint)¶

alloc-refill (uint)¶

alloc-waive (uint)¶

recycle-cached (uint)¶

recycle-cache-full (uint)¶

recycle-ring (uint)¶

recycle-ring-full (uint)¶

recycle-released-refcnt (uint)¶

napi¶

ifindex (u32)¶

doc

ifindex of the netdevice to which NAPI instance belongs.

id (u32)¶

doc

ID of the NAPI instance.

irq (u32)¶

doc

The associated interrupt vector number for the napi

pid (u32)¶

doc

PID of the napi thread, if NAPI is configured to operate in threaded mode. If NAPI is not in threaded mode (i.e. uses normal softirq context), the attribute will be absent.

queue¶

id (u32)¶

doc

Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.

ifindex (u32)¶

doc

ifindex of the netdevice to which the queue belongs.

type (u32)¶

doc

Queue type as rx, tx. Each queue type defines a separate ID space.

enum

queue-type

napi-id (u32)¶

doc

ID of the NAPI instance which services this queue.

©The kernel development community. | Powered by Sphinx 5.0.1 & Alabaster 0.7.12 | Page source