目录
前言
参数
-i, --interface 获取当前的 QoS 配置
-f, --pfc 设置端口的PFC
-p --prio_tc 将优先级映射到ETC(出口流量类别)
-s --tsa , -t -t-cbw
-r --ratelimit 为每个 TC 添加速率限制
-d --dcbx 获取/设置 DCBX 模式
--trust 设置pcp 或 dscp
--dscp2prio 设置dscp到priority 映射
--buffer_size 设置接收缓冲区大小
--prio2buffer 将优先级映射到接收缓冲区
-h 帮助信息
前言
注意:此命令是临时的,非持久性的,重启网卡或主机后失效
原文:Mellanox Interconnect Community
mlnx_qos(Linux 工具 ,MLNX_OFED 的一部分)在mlnx-tools-5.2.0-0.54358.x86_64.rpm包内
这篇文章适用于 MLNX_OFED v4.2。
参考:
https://mymellanox.force.com/s/article/linux-driver-solutions
参数
-i, --interface 获取当前的 QoS 配置
# mlnx_qos -i eth2
# mlnx_qos -i eth2 DCBX mode: OS controlled Priority trust state: dscp dscp2prio mapping: prio:0 dscp:07,06,05,04,03,02,01,00, prio:1 dscp:15,14,13,12,11,10,09,08, prio:2 dscp:23,22,21,20,19,18,17,16, prio:3 dscp:31,30,29,28,27,26,25,24, prio:4 dscp:39,38,37,36,35,34,33,32, prio:5 dscp:47,46,45,44,43,42,41,40, prio:6 dscp:55,54,53,52,51,50,49,48, prio:7 dscp:63,62,61,60,59,58,57,56, Cable len: 10 PFC configuration: priority 0 1 2 3 4 5 6 7 enabled 1 0 1 0 0 0 1 1 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 设置端口的PFC
该参数用于设置端口的优先流控制(PFC)配置。您可以启用优先级priorities 0...7 的任何子集。
优先级是使用 逗号分隔的 列表 提供的。
例如,要启用 priority 3,请运行:
# mlnx_qos -i eth2 -f 0,0,0,1,0,0,0,0 #0-1-2-3-4-5-6-7
要检查配置,请运行:
# mlnx_qos -i eth2
PFC configuration:
priority 0 1 2 3 4 5 6 7
enabled 0 0 0 1 0 0 0 0
...
-p --prio_tc 将优先级映射到ETC(出口流量类别)
此参数用于将优先级映射到出口流量类别 (ETC)。
注意:默认情况下,优先级priority 0 映射到 tc1,优先级priority 1 映射到 tc0。所有其他优先级都映射到同一个 TC。
要更改映射,执行更改命令。例如:
# mlnx_qos -i eth2 -p 0,1,2,3,4,5,6,7
-s --tsa , -t -t-cbw
-s 用于设置 出口调度方法:严格优先级或每个traffic class的 ETS。
-t 用于设置每个traffic class (TC) 的带宽(当此 TC 出口调度方法为 ETS 时相关),总和必须为 100,而严格优先级必须为 0 bw。
这些配置必须结合在一起。
例如,要为 tc6 设置严格优先级(strict priority),而其余的都是 ETS,请运行:
# mlnx_qos -i eth2 -s ets,ets,ets,ets,ets,ets,strict,ets -t 10,10,10,10,10,10,0,40
讯享网# 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 为每个 TC 添加速率限制
此参数用于为每个 TC 添加速率限制。例如,要将 tc0 限制为 5G,将 tc3 限制为 10G,将 tc6 限制为 7G,请运行:
# mlnx_qos -i eth2 -r 5,0,0,10,0,0,7,0
-d --dcbx 获取/设置 DCBX 模式
此参数用于获取/设置 DCBX 模式(固件或操作系统控制)。有关更多信息,请参阅
《HowTo Auto-Config PFC and ETS on ConnectX-4 via LLDP DCBX》MyMellanoxGen2
--trust 设置pcp 或 dscp
此参数用于设置trust级别(pcp 或 dscp,即L2或L3)。也可以看看《HowTo Configure Trust State on Mellanox Adapters》
MyMellanoxGen2
请注意,要使此设置对 VF 生效,请重新加载 VF 驱动程序或重新启动 VM。
# mlnx_qos -i eth2 --trust=dscp
DCBX mode: OS controlled
Priority trust state: dscp
dscp2prio mapping:
prio:0 dscp:07,06,05,04,03,02,01,00,
prio:1 dscp:15,14,13,12,11,10,09,08,
prio:2 dscp:23,22,21,20,19,18,17,16,
prio:3 dscp:31,30,29,28,27,26,25,24,
prio:4 dscp:39,38,37,36,35,34,33,32,
prio:5 dscp:47,46,45,44,43,42,41,40,
prio:6 dscp:55,54,53,52,51,50,49,48,
prio:7 dscp:63,62,61,60,59,58,57,56,
--dscp2prio 设置dscp到priority 映射
# mlnx_qos -i eth2 --dscp2prio set,30,6
DCBX mode: OS controlled
Priority trust state: dscp
dscp2prio mapping:
prio:0 dscp:07,06,05,04,03,02,01,00,
prio:1 dscp:15,14,13,12,11,10,09,08,
prio:2 dscp:23,22,21,20,19,18,17,16,
prio:3 dscp:31,29,28,27,26,25,24,
prio:4 dscp:39,38,37,36,35,34,33,32,
prio:5 dscp:47,46,45,44,43,42,41,40,
prio:6 dscp:30,55,54,53,52,51,50,49,48,
prio:7 dscp:63,62,61,60,59,58,57,56,
--buffer_size 设置接收缓冲区大小
# mlnx_qos -i ens2f0 --buffer_size 80296,80296,1000,80296,1000,1000,1000,1000
DCBX mode: OS controlled
Priority trust state: pcp
Receive buffer size (bytes): 80256,80256,896,80256,896,896,896,896,
Cable len: 7
PFC configuration:
priority 0 1 2 3 4 5 6 7
enabled 0 0 0 0 0 0 0 0
buffer 0 0 0 0 0 0 0 0
--prio2buffer 将优先级映射到接收缓冲区
# mlnx_qos -i ens2f0 --prio2buffer 0,2,5,7,1,2,3,6
DCBX mode: OS controlled
Cable len: 7
PFC configuration:
priority 0 1 2 3 4 5 6 7
enabled 0 0 0 0 0 0 0 0
buffer 0 2 5 7 1 2 3 6
-h 帮助信息
This parameter is used to display help information.
该参数用于显示帮助信息。
mellanox配置ECN:Explicit Congestion Notification (ECN) -https://docs.nvidia.com/networking/pages/viewpage.action?pageId=
mellanox配置PFC:
Flow Control - https://docs.nvidia.com/networking/display/MLNXOFEDv/Flow+Control

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/54070.html