nndocs:infiniband
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| nndocs:infiniband [2024/12/14 17:59] – update SR-IOV config naptastic | nndocs:infiniband [2026/08/09 06:35] (current) – Move GUIDs to their pages naptastic | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| =====InfiniBand===== | =====InfiniBand===== | ||
| Configuration is a real pain. On my Debian hosts, it's all in / | Configuration is a real pain. On my Debian hosts, it's all in / | ||
| + | |||
| + | * [[nndocs:: | ||
| + | * [[nndocs:: | ||
| + | * [[nndocs:: | ||
| + | * [[SX6005]] | ||
| + | * [[SX6036]] | ||
| ===The Problem=== | ===The Problem=== | ||
| - | All the InfiniBand hardware I have is Mellanox FDR-generation, so, ConnectX-3, Connect-IB, and SX6005 IB-only switches. (Every time I think "the Ethernet version sure would be nice" I remind myself that I'd use InfiniBand mode anyway.) | + | All the InfiniBand hardware I have is Mellanox FDR-generation. |
| - | For hardware support, Mellanox provides MLNX_OFED, an overlay for several distributions. Unfortunately, | + | For hardware support, Mellanox provides MLNX_OFED, an overlay for several distributions. Unfortunately, |
| ^ Version ^ Minimum hardware ^ Debian ^ Ubuntu ^ OpenSM version ^ | ^ Version ^ Minimum hardware ^ Debian ^ Ubuntu ^ OpenSM version ^ | ||
| Line 78: | Line 84: | ||
| Here's a block for my ATA over Ethernet experiments. Subject to change. IP addresses are necessary for setting up VXLAN tunnels. Checking if IPv6 tunnels perform differently from IPv4 tunnels is on the to-do list. I suspect they perform better. Needs testing. | Here's a block for my ATA over Ethernet experiments. Subject to change. IP addresses are necessary for setting up VXLAN tunnels. Checking if IPv6 tunnels perform differently from IPv4 tunnels is on the to-do list. I suspect they perform better. Needs testing. | ||
| - | | + | |
| mgid=ff12: | mgid=ff12: | ||
| mgid=ff12: | mgid=ff12: | ||
| Line 85: | Line 91: | ||
| ====Partitions: | ====Partitions: | ||
| There' | There' | ||
| - | # echo 0xb129 | + | # echo 0xb128 |
| - | + | ||
| - | The sysfs interface for deleting child interfaces doesn' | + | |
| - | # ip link del ib0.b129 | + | |
| Resist the temptation to rename the interface to something descriptive. **It's already self-descriptive**. Creative naming is for VXLAN tunnels and bridges, e.g.: | Resist the temptation to rename the interface to something descriptive. **It's already self-descriptive**. Creative naming is for VXLAN tunnels and bridges, e.g.: | ||
| - | # ip link add vx129 type vxlan id 129 local 172.20.129.9 group 225.172.20.129 | + | # ip link add vx128 type vxlan id 128 local 172.20.128.13 group 225.172.20.128 |
| - | # ip link set master | + | # ip link set master |
| - | If you unset the high bit on the partition number | + | The sysfs interface for deleting child interfaces doesn' |
| + | # ip link del ib0.b128 | ||
| - | It' | + | If you unset the high bit on the partition number (0x3128 instead of 0xb128) Linux will set the high bit before joining the partition. If OpenSM' |
| ====Connected vs. Datagram==== | ====Connected vs. Datagram==== | ||
| Line 122: | Line 126: | ||
| =====SR-IOV===== | =====SR-IOV===== | ||
| + | |||
| ====Hardware Settings==== | ====Hardware Settings==== | ||
| The BIOS needs to have SR-IOV, ARI, and ACS support enabled. | The BIOS needs to have SR-IOV, ARI, and ACS support enabled. | ||
| Line 131: | Line 136: | ||
| SRIOV_EN | SRIOV_EN | ||
| - | FPP_EN (Function Per Port ENable) controls whether the card appears as two PCI devices, or as a single device with two ports. Under mlx4, every VF on a dual-port HCA has both ports, and NUM_OF_VFs is how many dual-port devices to create. Under mlx5, each port gets its own pool of VFs and NUM_OF_VFs is per-port. | + | FPP_EN (Function Per Port ENable) controls whether the card appears as two PCI devices, or as a single device with two ports. Under mlx5, each port gets its own pool of VFs and NUM_OF_VFs is per-port. |
| - | I haven' | + | I haven' |
| - | + | ||
| - | To make VFs exist, put a number <= NUM_OF_VFS into sriov_numvfs for that device. Before doing so, I recommend turning off VF probing. Otherwise the VFs will all make IPoIB interfaces, which probably isn't what you want. This setting is per PF. | + | |
| - | + | ||
| - | I'm still checking if there' | + | |
| - | + | ||
| - | # echo 0 > / | + | |
| - | # echo 0 > / | + | |
| - | + | ||
| - | If it works, there will be new PCI devices as well as VFs listed under `ip link`: | + | |
| - | + | ||
| - | # echo 7 > / | + | |
| - | # lspci | grep nfi | + | |
| - | 06:00.0 Infiniband controller: Mellanox Technologies MT27600 [Connect-IB] | + | |
| - | 06:00.1 Infiniband controller: Mellanox Technologies MT27600 [Connect-IB] | + | |
| - | 06:00.2 Infiniband controller: Mellanox Technologies MT27600 Family [Connect-IB Virtual Function] | + | |
| - | 06:00.3 Infiniband controller: Mellanox Technologies MT27600 Family [Connect-IB Virtual Function] | + | |
| - | 06:00.4 Infiniband controller: Mellanox Technologies MT27600 Family [Connect-IB Virtual Function] | + | |
| - | 06:00.5 Infiniband controller: Mellanox Technologies MT27600 Family [Connect-IB Virtual Function] | + | |
| - | 06:00.6 Infiniband controller: Mellanox Technologies MT27600 Family [Connect-IB Virtual Function] | + | |
| - | 06:00.7 Infiniband controller: Mellanox Technologies MT27600 Family [Connect-IB Virtual Function] | + | |
| - | 06:01.0 Infiniband controller: Mellanox Technologies MT27600 Family [Connect-IB Virtual Function] | + | |
| - | + | ||
| - | Warning: The output from ip link is very wide. | + | |
| - | + | ||
| - | # ip link | + | |
| - | 1: lo: < | + | |
| - | link/ | + | |
| - | 2: eth0: < | + | |
| - | link/ether 3c: | + | |
| - | 3: eth1: < | + | |
| - | link/ether 3c: | + | |
| - | 4: ib0: < | + | |
| - | link/ | + | |
| - | vf 0 | + | |
| - | vf 1 | + | |
| - | vf 2 | + | |
| - | vf 3 | + | |
| - | vf 4 | + | |
| - | vf 5 | + | |
| - | vf 6 | + | |
| - | 5: ib1: < | + | |
| - | link/ | + | |
| - | + | ||
| - | ====VF Configuration==== | + | |
| - | The official documentation covers a sysfs interface for configuring VF properties. That interface hasn't existed for years. Before using a VF, you must set node_guid, port_guid, and state using ip link. Make port_guid == node_guid == unique. (I use the base port guid + VF + 1.) | + | |
| - | + | ||
| - | GUIDs need to be set before attaching a VF to a VM. It should be possible to change state (simulating unplugging the cable) while a VM is using a VF but I haven' | + | |
| - | + | ||
| - | This is in / | + | |
| - | ip link set dev ib0 vf 0 node_guid 58: | + | |
| - | ip link set dev ib0 vf 0 port_guid 58: | + | |
| - | ip link set dev ib0 vf 0 state enable | + | |
| - | ip link set dev ib0 vf 1 node_guid 58: | + | |
| - | ip link set dev ib0 vf 1 port_guid 58: | + | |
| - | ip link set dev ib0 vf 1 state enable | + | |
| - | ip link set dev ib0 vf 2 node_guid 58: | + | |
| - | ip link set dev ib0 vf 2 port_guid 58: | + | |
| - | ip link set dev ib0 vf 2 state enable | + | |
| - | ip link set dev ib0 vf 3 node_guid 58: | + | |
| - | ip link set dev ib0 vf 3 port_guid 58: | + | |
| - | ip link set dev ib0 vf 3 state enable | + | |
| - | ip link set dev ib0 vf 4 node_guid 58: | + | |
| - | ip link set dev ib0 vf 4 port_guid 58: | + | |
| - | ip link set dev ib0 vf 4 state enable | + | |
| - | ip link set dev ib0 vf 5 node_guid 58: | + | |
| - | ip link set dev ib0 vf 5 port_guid 58: | + | |
| - | ip link set dev ib0 vf 5 state enable | + | |
| - | ip link set dev ib0 vf 6 node_guid 58: | + | |
| - | ip link set dev ib0 vf 6 port_guid 58: | + | |
| - | ip link set dev ib0 vf 6 state enable | + | |
| - | + | ||
| - | Lazy copy-pasta for [this card not currently installed]: | + | |
| - | ip link set dev ib0 vf 0 node_guid 58: | + | |
| - | ip link set dev ib0 vf 0 port_guid 58: | + | |
| - | ip link set dev ib0 vf 0 state enable | + | |
| - | ip link set dev ib0 vf 1 node_guid 58: | + | |
| - | ip link set dev ib0 vf 1 port_guid 58: | + | |
| - | ip link set dev ib0 vf 1 state enable | + | |
| - | ip link set dev ib0 vf 2 node_guid 58: | + | |
| - | ip link set dev ib0 vf 2 port_guid 58: | + | |
| - | ip link set dev ib0 vf 2 state enable | + | |
| - | ip link set dev ib0 vf 3 node_guid 58: | + | |
| - | ip link set dev ib0 vf 3 port_guid 58: | + | |
| - | ip link set dev ib0 vf 3 state enable | + | |
| - | ip link set dev ib0 vf 4 node_guid 58: | + | |
| - | ip link set dev ib0 vf 4 port_guid 58: | + | |
| - | ip link set dev ib0 vf 4 state enable | + | |
| - | ip link set dev ib0 vf 5 node_guid 58: | + | |
| - | ip link set dev ib0 vf 5 port_guid 58: | + | |
| - | ip link set dev ib0 vf 5 state enable | + | |
| - | ip link set dev ib0 vf 6 node_guid 58: | + | |
| - | ip link set dev ib0 vf 6 port_guid 58: | + | |
| - | ip link set dev ib0 vf 6 state enable | + | |
| - | + | ||
| - | Lazy (and incomplete) copy-pasta for [also not installed]: | + | |
| - | ip link set dev ib0 vf 0 node_guid 58: | + | |
| - | ip link set dev ib0 vf 0 port_guid 58: | + | |
| - | ip link set dev ib0 vf 0 state enable | + | |
| - | + | ||
| - | These should really go on their own page. Or better yet, figure out how to configure them on the host! | + | |
| =====Upper-Layer Protocols (ULPs)===== | =====Upper-Layer Protocols (ULPs)===== | ||
| Line 250: | Line 155: | ||
| None of these services is so performance-critical that I'll spend time configuring it for VMA, except maybe as a learning exercise. **Later**. | None of these services is so performance-critical that I'll spend time configuring it for VMA, except maybe as a learning exercise. **Later**. | ||
| + | |||
| ====Storage==== | ====Storage==== | ||
| * NFS/RDMA (probably needs a page) | * NFS/RDMA (probably needs a page) | ||
| Line 257: | Line 163: | ||
| * See [[iSCSI]] for information about enabling and using iSER. | * See [[iSCSI]] for information about enabling and using iSER. | ||
| * See [[NVMe-oF]] for using NVMe over InfiniBand. | * See [[NVMe-oF]] for using NVMe over InfiniBand. | ||
| - | * I'm curious about the performance of SRP. I have gotten it to work before | + | * [[SRP]] is fast but the documentation is a joke. |
| ====Networking==== | ====Networking==== | ||
| ===VXLAN=== | ===VXLAN=== | ||
| - | VXLAN is not the only way to get an Ethernet device on Infiniband, but as far as I can tell it's the only decent one. Neither | + | VXLAN is not the only way to get an Ethernet device on Infiniband, but as far as I can tell it's the only decent one. |
| + | |||
| + | ConnectX-3 | ||
| * VXLAN id can be anything from 0-16777215 inclusive. I make it match the network number. | * VXLAN id can be anything from 0-16777215 inclusive. I make it match the network number. | ||
| Line 270: | Line 179: | ||
| export vxlan=64 | export vxlan=64 | ||
| - | export vxlan_name=ibnet0 # this doesn' | ||
| export local=172.20.64.9 | export local=172.20.64.9 | ||
| export group=225.172.20.64 | export group=225.172.20.64 | ||
| Line 282: | Line 190: | ||
| //Et viola//, Ethernet on top of InfiniBand. | //Et viola//, Ethernet on top of InfiniBand. | ||
| - | If/when I get hardware capable of VXLAN offload, the dstport might have to change. | + | Note: The Infiniband MTU is 4k; IPoIB takes 4 bytes and VXLAN takes 50, leaving a max MTU of 4042. |
| ====Multimedia==== | ====Multimedia==== | ||
| Line 288: | Line 196: | ||
| I also want to throw audio frames around with "no latency added" | I also want to throw audio frames around with "no latency added" | ||
| + | |||
| + | ====GUIDs==== | ||
| + | GUIDs and MAC addresses for Mellanox cards are listed on their respective pages. These two are ancient Qlogic adapters. I've never gotten them to work on my network; I pretty much just bought them to destroy and learn. | ||
| + | |||
| + | * 001175000079b560 - uninstalled qib | ||
| + | * 001175000079b856 - uninstalled qib | ||
| + | |||
nndocs/infiniband.1734199140.txt.gz · Last modified: 2024/12/14 17:59 by naptastic
