Documentation chapters

Host computer

Host setup

Addresses

Host portHost addressBoard addressCarries
connected to FO1192.168.67.10/24192.168.67.2RX A and RX B (UDP 10700), board control (TCP 5025)
connected to FO2192.168.68.10/24192.168.68.2RX C and RX D (UDP 10701)

Interface settings

SettingValueReason
MTU9000the IPv4 packet has 8252 bytes
Receive ringmaximum of the card (ethtool -g)absorbs short stalls of the application
Ethernet pause framesoffa pause frame from the host stops the stream until the next debug on
net.core.rmem_max268435456the host libraries ask for a 256 MB socket buffer per link, about 0.25 s of data
sudo ip link set <FO1 interface> mtu 9000
sudo ip link set <FO2 interface> mtu 9000
sudo ethtool -G <FO1 interface> rx 8192
sudo ethtool -G <FO2 interface> rx 8192
sudo ethtool -A <FO1 interface> autoneg off rx off tx off
sudo ethtool -A <FO2 interface> autoneg off rx off tx off
sudo sysctl -w net.core.rmem_max=268435456

The settings are lost on a restart of the host. optimize_eth_config.sh <FO1 interface> <FO2 interface> in host-tools applies all of them.

PCIe

Both links together carry 16.1 Gb/s over the PCIe bus of a dual-port card.

Card and slotResult
PCIe 3.0, x4 or widerboth links without loss
PCIe 2.0, x8both links without loss
PCIe 2.0, x4about 13 Gb/s: about 18 % of the datagrams lost with both links; one link alone works
  • A PCIe 2.0 lane carries 4 Gb/s of data; four lanes give 16 Gb/s before protocol overhead.
  • Many slots are mechanically x16 with four lanes wired.

Negotiated link of the card, readable by any user:

cat /sys/class/net/<interface>/device/current_link_speed
cat /sys/class/net/<interface>/device/current_link_width
current_link_speedPCIe generationcurrent_link_width needed for both links
2.5 GT/s1.xnot sufficient (2 Gb/s per lane)
5.0 GT/s2.08
8.0 GT/s or more3.0 or later4

The same two values are in the LnkSta line of sudo lspci -vv for the card. lspci shows that line only to root.

Tested cards: Tested 10 GbE hardware.

Symptoms

SymptomCause
No datagrams receivedMTU below 9000, wrong host address, a firewall on UDP 10700 and 10701, or another program holds the ports
The stream stops after about 280 datagramsEthernet pause frames are on
A constant share of datagrams lost on both linksPCIe link too narrow
Single datagrams lost, CRC errors counted by the card (ethtool -S)optical power too low: dirty connector or damaged fibre
Loss only while capturing with Wireshark or dumpcapthe host loses frames while writing; see Wireshark dissector