devlinkportfunctionrateshow-displayrateobjects.
Displays specified rate object or, if not specified, all rate objects. Rate object can be presented by
one of the two types:
leaf Represents a single devlink port; created/destroyed by the driver and bound to the devlink port.
As example, some driver may create leaf rate object for every devlink port associated with VF.
Since leaf have 1to1 mapping to it's devlink port, in user space it is referred as corresponding
devlink port DEV/PORT_INDEX;
node Represents a group of rate objects; created/deleted by the user (see command below) and bound to
the devlink device rather then to the devlink port. In userspace it is referred as DEV/NODE_NAME,
where node name can be any, except decimal number, to avoid collisions with leafs.
Command output show rate object identifier, it's type and rate values along with parent node name. Rate
values printed in SI units which are more suitable to represent specific value. To print values in IEC
units -i switch is used. JSON (-j) output always print rate values in bytes per second. Zero rate values
means "unlimited" rates and omitted in output, as well as parent node name.
devlinkportfunctionrateset-setrateobjectparameters.
Allows set rate object's parameters. If any parameter specified multiple times the last occurrence is
used.
DEV/PORT_INDEX - specifies devlink leaf rate object.
DEV/NODE_NAME - specifies devlink node rate object.
tx_shareVALUE - specifies minimal tx rate value shared among all rate objects. If rate object is a part
of some rate group, then this value shared with rate objects of this rate group.
tx_maxVALUE - specifies maximum tx rate value.
tx_priorityN - allows for usage of strict priority arbiter among siblings. This arbitration scheme
attempts to schedule nodes based on their priority as long as the nodes remain within their bandwidth
limit. The higher the priority the higher the probability that the node will get selected for scheduling.
tx_weightN - allows for usage of Weighted Fair Queuing arbitration scheme among siblings. This
arbitration scheme can be used simultaneously with the strict priority. As a node is configured with a
higher rate it gets more BW relative to it's siblings. Values are relative like a percentage points, they
basically tell how much BW should node take relative to it's siblings.
VALUE These parameter accept a floating point number, possibly followed by either a unit (both SI and
IEC units supported).
bit or a bare number
Bits per second
kbit Kilobits per second
mbit Megabits per second
gbit Gigabits per second
tbit Terabits per second
bps Bytes per second
kbps Kilobytes per second
mbps Megabytes per second
gbps Gigabytes per second
tbps Terabytes per second
To specify in IEC units, replace the SI prefix (k-, m-, g-, t-) with IEC prefix (ki-, mi-, gi-
and ti-) respectively. Input is case-insensitive.
N These parameter accept integer meaning weight or priority of a node.
parentNODE_NAME | noparent - set rate object parent to existing node with name NODE_NAME or unset
parent. Rate limits of the parent node applied to all it's children. Actual behaviour is details of
driver's implementation. Setting parent to empty ("") name due to the kernel logic treated as parent
unset.
devlinkportfunctionrateadd-createnoderateobjectwithspecifiedparameters.
Creates rate object of type node and sets parameters. Parameters same as for the "set" command.
DEV/NODE_NAME - specifies the devlink node rate object to create.
devlinkportfunctionratedel-deletenoderateobject
Delete specified devlink node rate object. Node can't be deleted if there is any child, user must
explicitly unset the parent.
DEV/NODE_NAME - specifies devlink node rate object to delete.
devlinkportfunctionratehelp-displayusageinformation
Display devlink rate usage information