summaryrefslogtreecommitdiff
path: root/Documentation/netlink
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2024-10-09 10:09:54 +0200
committerJakub Kicinski <kuba@kernel.org>2024-10-10 08:30:22 -0700
commit14bba9285aedefb99647d716b0f61bf32081e387 (patch)
tree915075a69748f27e82d357cfecaca5d58ecc7604 /Documentation/netlink
parentff7d4deb1f3e18b983cb51fc2dcb7af57991d827 (diff)
downloadlinux-14bba9285aedefb99647d716b0f61bf32081e387.tar.gz
linux-14bba9285aedefb99647d716b0f61bf32081e387.tar.bz2
linux-14bba9285aedefb99647d716b0f61bf32081e387.zip
netlink: spec: add shaper introspection support
Allow the user-space to fine-grain query the shaping features supported by the NIC on each domain. Reviewed-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Link: https://patch.msgid.link/3ddd10e450e3fe7d4b944c0d0b886d4483529ee6.1728460186.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'Documentation/netlink')
-rw-r--r--Documentation/netlink/specs/net_shaper.yaml88
1 files changed, 88 insertions, 0 deletions
diff --git a/Documentation/netlink/specs/net_shaper.yaml b/Documentation/netlink/specs/net_shaper.yaml
index 618fc09932ff..8ebad0d02904 100644
--- a/Documentation/netlink/specs/net_shaper.yaml
+++ b/Documentation/netlink/specs/net_shaper.yaml
@@ -26,6 +26,11 @@ doc: |
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: enum
@@ -148,6 +153,53 @@ attribute-sets:
name: priority
-
name: weight
+ -
+ name: caps
+ attributes:
+ -
+ name: ifindex
+ type: u32
+ doc: Interface index queried for shapers capabilities.
+ -
+ name: scope
+ type: u32
+ enum: scope
+ doc: The scope to which the queried capabilities apply.
+ -
+ name: support-metric-bps
+ type: flag
+ doc: The device accepts 'bps' metric for bw-min, bw-max and burst.
+ -
+ name: support-metric-pps
+ type: flag
+ doc: The device accepts 'pps' metric for bw-min, bw-max and burst.
+ -
+ name: support-nesting
+ type: flag
+ doc: |
+ The device supports nesting shaper belonging to this scope
+ below 'node' scoped shapers. Only 'queue' and 'node'
+ scope can have flag 'support-nesting'.
+ -
+ name: support-bw-min
+ type: flag
+ doc: The device supports a minimum guaranteed B/W.
+ -
+ name: support-bw-max
+ type: flag
+ doc: The device supports maximum B/W shaping.
+ -
+ name: support-burst
+ type: flag
+ doc: The device supports a maximum burst size.
+ -
+ name: support-priority
+ type: flag
+ doc: The device supports priority scheduling.
+ -
+ name: support-weight
+ type: flag
+ doc: The device supports weighted round robin scheduling.
operations:
list:
@@ -272,3 +324,39 @@ operations:
- leaves
reply:
attributes: *ns-binding
+
+ -
+ name: cap-get
+ doc: |
+ Get the shaper capabilities supported by the given device
+ for the specified scope.
+ attribute-set: caps
+
+ do:
+ pre: net-shaper-nl-cap-pre-doit
+ post: net-shaper-nl-cap-post-doit
+ request:
+ attributes:
+ - ifindex
+ - scope
+ reply:
+ attributes: &cap-attrs
+ - ifindex
+ - scope
+ - support-metric-bps
+ - support-metric-pps
+ - support-nesting
+ - support-bw-min
+ - support-bw-max
+ - support-burst
+ - support-priority
+ - support-weight
+
+ dump:
+ pre: net-shaper-nl-cap-pre-dumpit
+ post: net-shaper-nl-cap-post-dumpit
+ request:
+ attributes:
+ - ifindex
+ reply:
+ attributes: *cap-attrs