Intel® Acceleration Stack User Guide: Intel® FPGA Programmable Acceleration Card N3000-N/2

ID 683362
Date 11/01/2021
Public
Document Table of Contents

10.3. Ethernet Pause Flow Control

The Intel® FPGA PAC N3000-N/2 supports pause frame operation for:
  • 25G as described in Flow Control section of 25G Ethernet Intel Arria 10 FPGA IP User Guide.
The Intel provided FPGA image supports generation of pause frames in response to the internal Intel® Arria® 10 buffer nearing an overflow condition. The provided FPGA image does not support response to received pause frames. The pause frame generation and response to pause frame reception is disabled by default. You can read the current setting of pause frame generation using:
$ ethtool --show-pause npacf0g0l0
Pause parameters for npacf0g0l0:
Autonegotiate:	off
RX:		off
TX:		off
To turn on the pause frame generation:
  1. If you have more than one Intel® FPGA PAC N3000-N/2 installed in your server, first determine the proper sysfs entry for setting the transmit pause registers.
  2. Set Transmit Pause Quanta: Configurable register used to set the desired delay time embedded in the pause frame packet requesting peer to stop transmitting for a period defined in the quanta. One quanta equals 512-bit times.
  3. Set Transmit Hold-off Quanta: Configurable register used to set the desired delay time between consecutive pause frames packets in quanta.
  4. Pause Frame Enable: Allows you to enable or disable pause frame behavior using the ethtool.
Each Ethernet port has a set of transmit pause or hold-off registers. To find the proper sysfs entry, use the following command:
$ ls -l /sys/class/fpga/intel-fpga-dev.*
Sample output:
lrwxrwxrwx. 1 root root 0 Apr  1 06:13 /sys/class/fpga/intel-fpga-dev.0 -> ../../devices/pci0000:85/0000:85:00.0/0000:86:00.0/0000:87:09.0/0000:8a:00.0/fpga/intel-fpga-dev.0
lrwxrwxrwx. 1 root root 0 Apr  1 09:01 /sys/class/fpga/intel-fpga-dev.1 -> ../../devices/pci0000:17/0000:17:00.0/0000:18:00.0/0000:19:09.0/0000:1b:00.0/fpga/intel-fpga-dev.1
In the output above, there are two Intel® FPGA PAC N3000-N/2. For this example, the PCIe device ID of the desired card is 1b:00.0, hence the base sysfs path is /sys/class/fpga/intel-fpga-dev.1.
Setting the Transmit Pause Quanta sysfs entry to 200 quanta for port 0:
# echo 200 > /sys/class/fpga/intel-fpga-dev.1/intel-fpga-fme.1/pac_n3000_net.10.auto/net/npacf1g0l0/tx_pause_frame_quanta
# cat /sys/class/fpga/intel-fpga-dev.1/intel-fpga-fme.1/pac_n3000_net.10.auto/net/npacf1g0l0/tx_pause_frame_quanta 
0xc8
Setting the Transmit Hold-off Quanta sysfs entry to 200 quanta for port 0:
# echo 200 > /sys/class/fpga/intel-fpga-dev.1/intel-fpga-fme.1/pac_n3000_net.10.auto/net/npacf1g0l0/tx_pause_frame_holdoff
# cat /sys/class/fpga/intel-fpga-dev.1/intel-fpga-fme.1/pac_n3000_net.10.auto/net/npacf1g0l0/tx_pause_frame_holdoff
0xc8
To verify:
# ethtool --pause npacf0g0l0 tx on
# ethtool --show-pause npacf0g0l0
Pause parameters for npacf0g0l0:
Autonegotiate:	off
RX:		off
TX:		on
Note: All Ethernet settings listed in this section are not persistent across power cycles or server reboots or rsu. After power cycle or server reboot or rsu, the Intel® FPGA PAC N3000-N/2 returns to default settings. The rsu command causes change in the PCIe B:D.F value.