devlink-rate - Man Page

devlink rate management

Synopsis

devlink [ OPTIONS ] port function rate { COMMAND | help }

OPTIONS := { -j[son] | -p[retty] | -i[ec] }

devlink port function rate show [ { DEV/PORT_INDEX | DEV/NODE_NAME } ]

devlink port function rate set { DEV/PORT_INDEX | DEV/NODE_NAME } [ tx_share VALUE ] [ tx_max VALUE ] [ tx_priority N ] [ tx_weight N ] [ { parent NODE_NAME | noparent } ]

devlink port function rate add DEV/NODE_NAME [ tx_share VALUE ] [ tx_max VALUE ] [ tx_priority N ] [ tx_weight N ] [ { parent NODE_NAME | noparent } ]

devlink port function rate del DEV/NODE_NAME

devlink port function rate help

Description

Examples

* Display all rate objects:

# devlink port function rate show
pci/0000:03:00.0/1 type leaf parent some_group
pci/0000:03:00.0/2 type leaf tx_share 12Mbit
pci/0000:03:00.0/some_group type node tx_share 1Gbps tx_max 5Gbps

* Display leaf rate object bound to the 1st devlink port of the pci/0000:03:00.0 device:

# devlink port function rate show pci/0000:03:00.0/1
pci/0000:03:00.0/1 type leaf

* Display leaf rate object rate values using IEC units:

# devlink -i port function rate show pci/0000:03:00.0/2
pci/0000:03:00.0/2 type leaf 11718Kibit

* Display node rate object with name some_group of the pci/0000:03:00.0 device:

# devlink port function rate show pci/0000:03:00.0/some_group
pci/0000:03:00.0/some_group type node

* Display pci/0000:03:00.0/2 leaf rate object as pretty JSON output:

# devlink -jp port function rate show pci/0000:03:00.0/2
{
   "rate": {
       "pci/0000:03:00.0/2": {
           "type": "leaf",
           "tx_share": 1500000
       }
   }
}

* Create node rate object with name "1st_group" on pci/0000:03:00.0 device:

# devlink port function rate add pci/0000:03:00.0/1st_group

* Create node rate object with specified parameters:

# devlink port function rate add pci/0000:03:00.0/2nd_group \
tx_share 10Mbit tx_max 30Mbit parent 1st_group

* Set parameters to the specified leaf rate object:

# devlink port function rate set pci/0000:03:00.0/1 \
tx_share 2Mbit tx_max 10Mbit

* Set leaf's parent to "1st_group":

# devlink port function rate set pci/0000:03:00.0/1 parent 1st_group

* Unset leaf's parent:

# devlink port function rate set pci/0000:03:00.0/1 noparent

* Delete node rate object:

# devlink port function rate del pci/0000:03:00.0/2nd_group

See Also

devlink(8), devlink-port(8)

Author

Dmytro Linkin <dlinkin@nvidia.com>

Referenced By

devlink-port(8).

12 Mar 2021 iproute2 Linux