image image image image image

On This Page

To learn more about port QoS configuration, refer to this community post.

When working in Embedded Host mode, using mlnx_qos on both the host and Arm will result with undefined behavior. Users must only use mlnx_qos from the Arm. After changing the QoS settings from Arm, users must restart the mlx5 driver on host.

When configuring QoS using DCBX, the lldpad service from the DPU side must be disabled if the configurations are not done using tools other than lldpad.

This section explains how to configure QoS group and settings using devlink located under /opt/mellanox/iproute2/sbin/. It is applicable to host PF/VF and Arm side SFs. The following uses VF as example.

The settings of a QoS group include creating/deleting a QoS group and modifying its tx_max and tx_share values. The settings of VF QoS include modifying its tx_max and tx_share values, assigning a VF to a QoS group, and unassigning a VF from a QoS group. This section focuses on the configuration syntax.

Please refer to section "Limit and Bandwidth Share Per VF" in the MLNX_OFED User Manual for detailed explanation on vPort QoS behaviors.

devlink port function rate add


devlink port function rate add <DEV>/<GROUP_NAME>

Adds a QoS group.

Syntax DescriptionDEV/GROUP_NAMESpecifies group name in string format
Example
This command adds a new QoS group named "12_group" under device "pci/0000:03:00.0":


devlink port function rate add pci/0000:03:00.0/12_group
Notes

devlink port function rate del


devlink port function rate del <DEV>/<GROUP_NAME>

Deletes a QoS group.

Syntax DescriptionDEV/GROUP_NAMESpecifies group name in string format
Example
This command deletes QoS group "12_group" from device "pci/0000:03:00.0":


devlink port function rate del pci/0000:03:00.0/12_group
Notes

devlink port function rate set tx_max tx_share


devlink port function rate set {<DEV>/<GROUP_NAME> | <DEV>/<PORT_INDEX>} tx_max <TX_MAX> [tx_share <TX_SHARE>]

Sets tx_max and tx_share for QoS group or devlink port.

Syntax DescriptionDEV/GROUP_NAMESpecifies the group name to operate on
DEV/PORT_INDEXSpecifies the devlink port to operate on
TX_MAXtx_max bandwidth in Mb/s
TX_SHAREtx_share bandwidth in Mb/s
Example

This command sets tx_max to 2000Mb/s and tx_share to 500Mb/s for the "12_group" QoS group: 

devlink port function rate set pci/0000:03:00.0/12_group tx_max 2000Mbps tx_share 500Mbps

This command sets tx_max to 2000Mb/s and tx_share to 500Mb/s for the VF represented by port index 196609:

devlink port function rate set pci/0000:03:00.0/196609 tx_max 200Mbps tx_share 50Mbps
This command displays a mapping between VF devlink ports and netdev names:


$ devlink port
In the output of this command, VFs are indicated by flavour pcivf.
Notes

devlink port function rate set parent


devlink port function rate set <DEV>/<PORT_INDEX> {parent <PARENT_GROUP_NAME>}

Assigns devlink port to a QoS group.

Syntax DescriptionDEV/PORT_INDEXSpecifies the devlink port to operate on
PARENT_GROUP_NAMEparent group name in string format
Example

This command assigns this function to the QoS group "12_group":

devlink port function rate set pci/0000:03:00.0/196609 parent 12_group
Notes

devlink port function rate set noparent


devlink port function rate set <DEV>/<PORT_INDEX> noparent

Ungroups a devlink port.

Syntax DescriptionDEV/PORT_INDEXSpecifies the devlink port to operate on
Example
This command ungroups this function:


devlink port function rate set pci/0000:03:00.0/196609 noparent
Notes

devlink port function rate show


devlink port function rate show [<DEV>/<GROUP_NAME> | <DEV>/<PORT_INDEX>]

Displays QoS information QoS group or devlink port.

Syntax DescriptionDEV/GROUP_NAMESpecifies the group name to display
DEV/PORT_INDEXSpecifies the devlink port to display
Example

This command displays the QoS info of all QoS groups and devlink ports on the system: 

devlink port function rate show
pci/0000:03:00.0/12_group type node tx_max 2000Mbps tx_share 500Mbps
pci/0000:03:00.0/196609 type leaf tx_max 200Mbps tx_share 50Mbps parent 12_group

This command displays QoS info of 12_group: 

devlink port function rate show pci/0000:03:00.0/12_group
pci/0000:03:00.0/12_group type node tx_max 2000Mbps tx_share 500Mbps
NotesIf a QoS group name or devlink port are not specified, all QoS groups and devlink ports are displayed.