Documentation/netlink/specs/net_shaper.yaml

Source file repositories/reference/linux-study-clean/Documentation/netlink/specs/net_shaper.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/netlink/specs/net_shaper.yaml
Extension
.yaml
Size
10727 bytes
Lines
371
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
---
name: net-shaper

doc: |
  Networking HW rate limiting configuration.

  This API allows configuring HW shapers available on the network
  devices at different levels (queues, network device) and allows
  arbitrary manipulation of the scheduling tree of the involved
  shapers.

  Each @shaper is identified within the given device, by a @handle,
  comprising both a @scope and an @id.

  Depending on the @scope value, the shapers are attached to specific
  HW objects (queues, devices) or, for @node scope, represent a
  scheduling group, that can be placed in an arbitrary location of
  the scheduling tree.

  Shapers can be created with two different operations: the @set
  operation, to create and update a single "attached" shaper, and
  the @group operation, to create and update a scheduling
  group. Only the @group operation can create @node scope shapers.

  Existing shapers can be deleted/reset via the @delete operation.

  The user can query the running configuration via the @get operation.

  Different devices can provide different feature sets, e.g. with no
  support for complex scheduling hierarchy, or for some shaping
  parameters. The user can introspect the HW capabilities via the
  @cap-get operation.

definitions:
  -
    type: const
    name: max-handle-id
    value: 0x3fffffe
    scope: kernel
  -
    type: enum
    name: scope
    doc: Defines the shaper @id interpretation.
    render-max: true
    entries:
      - name: unspec
        doc: The scope is not specified.
      -
        name: netdev
        doc: The main shaper for the given network device.
      -
        name: queue
        doc: |
            The shaper is attached to the given device queue,
            the @id represents the queue number.
      -
        name: node
        doc: |
             The shaper allows grouping of queues or other
             node shapers; can be nested in either @netdev
             shapers or other @node shapers, allowing placement
             in any location of the scheduling tree, except
             leaves and root.
  -
    type: enum
    name: metric
    doc: Different metric supported by the shaper.
    entries:
      -

Annotation

Implementation Notes