iRDMA流量控制总结 - 3

5.0 Priority Flow Control - Planning and Guidelines优先流量控制 - 规划与指导

This section covers planning, considerations, and general configuration guidelines for enabling PFC on a network. 本节介绍在网络上启用 PFC 的规划、注意事项和一般配置指南。

5.1  Steps步骤

The steps for enabling PFC on your network include the following: 在网络上启用 PFC 的步骤如下:

  1. Set up your network hosts and switches. (Network Host and Switch Setup) 设置网络主机和交换机。(网络主机和交换机设置)
  2. Decide whether to use willing or non-willing DCB mode on the 800 Series adapter.(Willing vs. Non-willing DCB Mode) 决定在 800 系列适配器上使用主动或被动 DCB 模式。
  3. Choose firmware or software DCB. (Firmware vs. Software DCB) 选择Firmware还是软件 DCB。(Firmware DCB 与软件 DCB)
  4. Decide how to separate and prioritize traffic streams. (Separating and Prioritizing Traffic Streams) 决定如何分离和优先处理数据流。(数据流的分离和优先级排序)
  5. Configure ETS: Map priorities to traffic classes and allocate bandwidth.

(Configuring ETS: Map Priorities to TCs/Allocate Bandwidth) 配置 ETS: 将优先级映射到数据流类别并分配带宽(配置 ETS:将优先级映射到数据流类别/分配带宽)

  1. Configure PFC: Set priorities for drop or no-drop. (Configuring PFC) 配置 PFC:为丢弃或不丢弃设置优先级。(配置 PFC)
  2. Run your application with the right priority. (Run Applications with the Right Priority) 以正确的优先级运行应用程序 (以正确的优先级运行应用程序)

5.1.1  Network Host and Switch Setup网络主机和交换机设置

NOTE 提示

 

PFC can be used with or without a switch in the network. PFC 可在网络中有交换机或没有交换机的情况下使用。

  • If using a switch, you must configure PFC on both the adapter ports and the switch ports. Consult the appropriate switch manual for command syntax. 如果使用交换机,则必须在适配器端口和交换机端口上配置 PFC。有关命令语法,请查阅相应的交换机手册。
  • If using adapters back-to-back, configure PFC on both hosts. 如果背靠背直接连接适配器,请在两台主机上配置 PFC。

Host prerequisites for RDMA are outside the scope of this guide, but in general, you need at a minimum: RDMA 的主机先决条件不在本指南的讨论范围之内,但一般来说,您至少需要具备以下条件:

  • Two Linux hosts with 800 Series adapters. 两台配备 800 系列适配器的 Linux 主机。
  • Supporting 800 Series firmware and software (NVM with RDMA support, ice (Intel® Ethernet) driver, and irdma driver). 支持 800 系列Firmware和软件(支持 RDMA 的 NVM、ice(英特尔® 以太网)驱动程序和 irdma 驱动程序)。

If using software in DCB mode, you also need OpenLLDP, which includes the lldpad daemon and lldptool configuration utility. 如果在 DCB 模式下使用软件,还需要 OpenLLDP,其中包括 lldpad 守护进程和 lldptool 配置实用程序。

  • In RHEL, install it with yum (zypper or apt-get might work as well in other operating systems.): 在 RHEL 中,使用 yum 安装(在其他操作系统中,使用 zypper 或 apt-get 也可以):

# yum install lldpad

  • Alternatively, install from source from: 或者,从源代码中安装:

GitHub - intel/openlldp

5.1.2  Willing vs. Non-willing DCB Mode主动与被动的 DCB 模式

DCB standards like PFC and ETS must be set to either willing or non-willing mode, which determines whether the port is willing to accept configuration settings from its link partner. PFC 和 ETS 等 DCB 标准必须设置为主动或被动模式,这决定了端口是否愿意接受其链路伙伴的配置设置。

Mode

When to Use

Willing

If you want to configure DCB on their switch and let adapters accept settings from the switch ports.

This is the preferred, most common setup.

Non-willing

For back-to-back configurations.

For troubleshooting, testing, and manually tweaking the configuration.

If preferred, configure DCB on all hosts and set the neighboring switch ports to willing (somewhat uncommon and might not be supported by all switches).

5.1.3  Firmware vs. Software DCB Firmware与软件 DCB

The 800 Series has two options for using DCB: firmware and software. 800 系列有两种使用 DCB 的选项:Firmware和软件。

  • Software DCB runs on the Linux host using OpenLLDP. It supports both willing and non-willing modes. 软件 DCB 使用 OpenLLDP 在 Linux 主机上运行。它支持主动和被动模式。
  • Firmware DCB runs on the 800 Series adapter firmware. It only supports willing mode. Firmware DCB 在 800 系列适配器固件上运行。它仅支持主动模式。

If you plan on using willing mode, software DCB is recommended but not required. 如果计划使用主动模式,建议使用软件 DCB,但不是必需的。

NOTE 提示

 

Only one type of DCB might be active at a time. Enabling firmware DCB overrides the software DCB setting. 一次只能激活一种 DCB。启用Firmware DCB 会覆盖软件 DCB 设置。

DCB Type

When to Use

Willing Mode Setup

Non-willing Mode Setup

Firmware

Willing

Mode

Not supported in firmware DCB.

# ethtool --set-priv-flags <iface> fw-lldpagent on

Software

Willing

Mode

Can be set up in IEEE or CEE modes.

Refer to Software DCB Willing Mode for details.

Software

Non-willing

Mode

# ethtool --set-priv-flags <iface> fw-lldpagent off

# lldptool -Ti <iface> -V PFC willing=yes

# lldptool -Ti <iface> -V ETS willing=yes

# ethtool --set-priv-flags <iface> fw-lldpagent off

# lldptool -Ti <iface> -V PFC willing=no

# lldptool -Ti <iface> -V ETS willing=no

5.1.4  Software DCB Willing Mode 软件 DCB 主动模式

Software DCB can be configured in either IEEE or CEE mode. 软件 DCB 可配置为 IEEE 或 CEE 模式。

For IEEE mode对于 IEEE 模式
  1. Disable CEE transmission. 禁用 CEE 传输。

#lldptool -Ti $interface -V CEE-DCBX enableTx=no

  1. Reset the DCBX mode to be auto (start in IEEE DCBX mode) after the next lldpad restart. 下次重启 lldpad 后,将 DCBX 模式重置为自动(以 IEEE DCBX 模式启动)。

#lldptool -Ti $interface -V IEEE-DCBX mode=reset

  1. Configure willing configuration for interface. 为接口配置主动模式。

#lldptool -Ti $interface -V ETS-CFG enableTx=yes willing=yes

  1. Configure willing recommendation for interface. 为接口配置主动模式建议。

#lldptool -Ti $interface -V ETS-REC enableTx=yes

Setting willing=yes for ETS-REC is not logical as it is by definition a recommendation for a willing link partner. 为 ETS-REC 设置 willing=yes 不符合逻辑,因为根据定义,它是建议把网络连接对端设置为主动模式。

  1. Configure willing PFC for interface. 为接口配置主动模式 PFC。

#lldptool -Ti $interface -V PFC enable=yes willing=yes enableTx=yes

  1. Terminate the first instance of lldpad that was started (e.g., from initrd). Once lldpad -k has been invoked and lldpad has been restarted, subsequent invocations of lldpad -k will not terminate lldpad. 终止第一个启动的 lldpad 实例(例如,从 initrd 启动)。一旦调用了 lldpad -k 并重新启动了 lldpad,以后再调用 lldpad -k 将不会终止 lldpad。

#lldpad -k

  1. Remove lldpad state records from shared memory. 从共享内存中删除 lldpad 状态记录。

#lldpad -s

  1. Restart service lldpad. 重新启动 lldpad 服务。

#systemctl restart lldpad.service

  1. Ensure CEE mode enableTx is set to no. 确保 CEE 模式 enableTx 设置为否。

#lldptool -ti $interface -V CEE-DCBX -c

你可能感兴趣的:(linux,kernel)