mlnx_qos

Version 8

    This post discusses the different options supported for the mlnx_qos Linux tool (part of MLNX_OFED).

    This page is aligned with OFED_4.1

     

    References

     

    Parameters

    -i, --interface

    Get the current configuration

    #  mlnx_qos -i eth2                                                               

    Priority trust mode: pcp

    PFC configuration:

      priority    0   1   2   3   4   5   6   7

      enabled     0   0   0   0   0   0   0   0  

     

     

    tc: 0 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  1

    tc: 1 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  0

    tc: 2 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  2

    tc: 3 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  3

    tc: 4 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  4

    tc: 5 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  5

    tc: 6 ratelimit: unlimited, tsa: strict

      priority:  6

    tc: 7 ratelimit: unlimited, tsa: ets, bw: 40%

      priority:  7

     

    -f, --pfc

    Set the Priority Flow Control (PFC) configuration on a port. You can enable any subset of priorities 0...7.

    The priorities are provided using a comma-delimited list. To enable priority 3, for example run:

    # mlnx_qos -i eth2 -f 0,0,0,1,0,0,0,0

    To check the configuration, run:

    # mlnx_qos -i eth2

    PFC configuration:

      priority    0   1   2   3   4   5   6   7

      enabled     0   0   0   1   0   0   0   0  

     

    ...

     

    PFC is enabled on priority 3.

     

    See also, HowTo Configure PFC on ConnectX-4 .

     

    -p --prio_tc

    Map priorities to egress traffic class (TC).

    Note, that by default priority 0 is mapped to tc1 and priority 1 is mapped to tc 0. All other priorities are mapped to the same TC.

     

    To change the mapping, add a command-delimited list. For example:

    # mlnx_qos -i eth2 -p 0,1,2,3,4,5,6,7

     

    This is the default mapping:

    # mlnx_qos -i eth2

    PFC configuration:

      priority    0   1   2   3   4   5   6   7

      enabled     0   0   0   1   0   0   0   0  

     

    tc: 0 ratelimit: unlimited, tsa: vendor

      priority:  1

    tc: 1 ratelimit: unlimited, tsa: vendor

      priority:  0

    tc: 2 ratelimit: unlimited, tsa: vendor

      priority:  2

    tc: 3 ratelimit: unlimited, tsa: vendor

      priority:  3

    tc: 4 ratelimit: unlimited, tsa: vendor

      priority:  4

    tc: 5 ratelimit: unlimited, tsa: vendor

      priority:  5

    tc: 6 ratelimit: unlimited, tsa: vendor

      priority:  6

    tc: 7 ratelimit: unlimited, tsa: vendor

      priority:  7

     

     

    -s --tsa , -t -t-cbw

     

    -S Set the Egress scheduling method, either strict priority or ETS per traffic class.

    -t Set the bandwidth per each traffic class (TC) (relevant when this TC egress scheduling method is ETS). The sum must be 100, while strict priority must get 0 bw.

     

    Those configuration must come together.

     

    For example, to set strict priority for tc 6, while all the rest will be an ETS run:

    #  mlnx_qos -i eth2 -s ets,ets,ets,ets,ets,ets,strict,ets -t 10,10,10,10,10,10,0,40

    Priority trust mode: pcp

    PFC configuration:

      priority    0   1   2   3   4   5   6   7

      enabled     0   0   0   0   0   0   0   0  

     

     

    tc: 0 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  1

    tc: 1 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  0

    tc: 2 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  2

    tc: 3 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  3

    tc: 4 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  4

    tc: 5 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  5

    tc: 6 ratelimit: unlimited, tsa: strict

      priority:  6

    tc: 7 ratelimit: unlimited, tsa: ets, bw: 40%

      priority:  7

     

    -r --ratelimit

    Add a rate limit for each TC. For example, to limit tc0 to 5G, tc3 to 10G, and tc6 to 7G, run:

    # mlnx_qos -i eth2 -r 5,0,0,10,0,0,7,0

     

    -d --dcbx

    Get/Set the DCBX mode (firmware or OS controlled). For more info, see  HowTo Auto-Config PFC and ETS on ConnectX-4 via LLDP DCBX.

     

    --trust

    Set the trust level (pcp or dscp). See also HowTo Configure Trust Mode on Mellanox Adapters.

    #  mlnx_qos -i eth2 --trust=dscp

    Priority trust mode: dscp

    PFC configuration:

      priority    0   1   2   3   4   5   6   7

      enabled     0   0   0   0   0   0   0   0  

     

    tc: 0 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  1

    tc: 1 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  0

    tc: 2 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  2

    tc: 3 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  3

    tc: 4 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  4

    tc: 5 ratelimit: unlimited, tsa: ets, bw: 10%

      priority:  5

    tc: 6 ratelimit: unlimited, tsa: strict

      priority:  6

    tc: 7 ratelimit: unlimited, tsa: ets, bw: 40%

      priority:  7

     

    Help

    Run -h to display help information.

     

    #  mlnx_qos -h    

    Usage: mlnx_qos -i <interface> [options]

     

     

    Options:

      --version             show program's version number and exit

      -h, --help            show this help message and exit

      -f LIST, --pfc=LIST   Set priority flow control for each priority. LIST is

                            comma separated value for each priority starting from

                            0 to 7. Example: 0,0,0,0,1,1,1,1 enable PFC on TC4-7

      -p LIST, --prio_tc=LIST

                            maps UPs to TCs. LIST is 8 comma seperated TC numbers.

                            Example: 0,0,0,0,1,1,1,1 maps UPs 0-3 to TC0, and UPs

                            4-7 to TC1

      -s LIST, --tsa=LIST   Transmission algorithm for each TC. LIST is comma

                            seperated algorithm names for each TC. Possible

                            algorithms: strict, etc. Example: ets,strict,ets sets

                            TC0,TC2 to ETS and TC1 to strict. The rest are

                            unchanged.

      -t LIST, --tcbw=LIST  Set minimal guaranteed %BW for ETS TCs. LIST is comma

                            seperated percents for each TC. Values set to TCs that

                            are not configured to ETS algorithm are ignored, but

                            must be present. Example: if TC0,TC2 are set to ETS,

                            then 10,0,90 will set TC0 to 10% and TC2 to 90%.

                            Percents must sum to 100.

      -r LIST, --ratelimit=LIST

                            Rate limit for TCs (in Gbps). LIST is a comma

                            seperated Gbps limit for each TC. Example: 1,8,8 will

                            limit TC0 to 1Gbps, and TC1,TC2 to 8 Gbps each.

      -d DCBX, --dcbx=DCBX  get the dcbx mode(get) or set dcbx mode to firmware

                            controlled(fw) or os controlled(os)

      --trust=TRUST         set priority trust mode to pcp or dscp

      -i INTF, --interface=INTF

                            Interface name

      -a                    Show all interface's TCs