Class: Nl::Linux::NetShaper::Messages::DoGroupRequest
- Inherits:
-
Genl::Message
- Object
- Raw::Message
- Genl::Message
- Nl::Linux::NetShaper::Messages::DoGroupRequest
- Defined in:
- nl-linux/generated/nl/linux/net_shaper.rb
Overview
Create or update a scheduling group, attaching the specified
leaves shapers under the specified node identified by handle.
The leaves shapers scope must be queue and the node shaper
scope must be either node or netdev.
When the node shaper has node scope, if the handle id is not
specified, a new shaper of such scope is created, otherwise the
specified node must already exist.
When updating an existing node shaper, the specified leaves are
added to the existing node; such node will also retain any preexisting
leave.
The parent handle for a new node shaper defaults to the parent
of all the leaves, provided all the leaves share the same parent.
Otherwise parent handle must be specified.
The user can optionally provide shaping attributes for the node
shaper.
The operation is atomic, on failure no change is applied to
the device shaping configuration, otherwise the node shaper
full identifier, comprising binding and handle, is provided
as the reply.
Requires CAP_NET_ADMIN in the initial user namespace.
Constant Summary collapse
- TYPE =
4- FIXED_HEADER =
nil- ATTRIBUTE_SET =
AttributeSets::NetShaper
- ATTRIBUTES =
Ractor.make_shareable(%i[handle metric bw_min bw_max burst priority weight ifindex parent leaves])
Instance Attribute Summary
Attributes included from StructuredPayload
Instance Method Summary collapse
-
#burst ⇒ Integer
Maximum burst-size for shaping.
-
#bw_max ⇒ Integer
Maximum bandwidth for the given shaper or 0 when unlimited.
-
#bw_min ⇒ Integer
Guaranteed bandwidth for the given shaper.
-
#handle ⇒ AttributeSets::Handle
Unique identifier for the given shaper inside the owning device.
-
#ifindex ⇒ Integer
Interface index owning the specified shaper.
-
#leaves ⇒ Array<AttributeSets::LeafInfo>
Describes a set of leaves shapers for a
groupoperation. -
#metric ⇒ Integer
Metric used by the given shaper for bw-min, bw-max and burst.
-
#parent ⇒ AttributeSets::Handle
Identifier for the parent of the affected shaper.
-
#priority ⇒ Integer
Scheduling priority for the given shaper.
-
#weight ⇒ Integer
Relative weight for round robin scheduling of the given shaper.
Methods inherited from Genl::Message
Methods inherited from Raw::Message
#append_attribute, decode, #initialize
Methods included from StructuredPayload
Constructor Details
This class inherits a constructor from Nl::Raw::Message
Instance Method Details
#burst ⇒ Integer
Maximum burst-size for shaping. Should not be interpreted as a quantum.
867 |
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 867 def burst; attributes[:"burst"]&.value; end |
#bw_max ⇒ Integer
Maximum bandwidth for the given shaper or 0 when unlimited.
861 |
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 861 def bw_max; attributes[:"bw_max"]&.value; end |
#bw_min ⇒ Integer
Guaranteed bandwidth for the given shaper.
856 |
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 856 def bw_min; attributes[:"bw_min"]&.value; end |
#handle ⇒ AttributeSets::Handle
Unique identifier for the given shaper inside the owning device.
844 |
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 844 def handle; attributes[:"handle"]&.value; end |
#ifindex ⇒ Integer
Interface index owning the specified shaper.
886 |
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 886 def ifindex; attributes[:"ifindex"]&.value; end |
#leaves ⇒ Array<AttributeSets::LeafInfo>
Describes a set of leaves shapers for a group operation.
897 |
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 897 def leaves; attributes[:"leaves"].map(&:value); end |
#metric ⇒ Integer
Metric used by the given shaper for bw-min, bw-max and burst.
Known enum values are defined in Enums::Metric.
851 |
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 851 def metric; attributes[:"metric"]&.value; end |
#parent ⇒ AttributeSets::Handle
Identifier for the parent of the affected shaper.
Only needed for group operation.
892 |
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 892 def parent; attributes[:"parent"]&.value; end |
#priority ⇒ Integer
Scheduling priority for the given shaper. The priority scheduling is applied to sibling shapers.
873 |
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 873 def priority; attributes[:"priority"]&.value; end |
#weight ⇒ Integer
Relative weight for round robin scheduling of the given shaper. The scheduling is applied to all sibling shapers with the same priority.
881 |
# File 'nl-linux/generated/nl/linux/net_shaper.rb', line 881 def weight; attributes[:"weight"]&.value; end |