User Tools

Site Tools


nndocs:infiniband

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nndocs:infiniband [2026/07/22 03:40] – [GUIDs] updates naptasticnndocs: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 /etc/rc.local, which is gross. I haven't figured out how to do it on Ubuntu, since Netplan apparently has support for vxlan and IP over IB (IPoIB) now, I think. **We'll get there**. Configuration is a real pain. On my Debian hosts, it's all in /etc/rc.local, which is gross. I haven't figured out how to do it on Ubuntu, since Netplan apparently has support for vxlan and IP over IB (IPoIB) now, I think. **We'll get there**.
 +
 +  * [[nndocs::infiniband::ConnectX-3]]
 +  * [[nndocs::infiniband::Connect-IB]]
 +  * [[nndocs::infiniband::ConnectX-4]]
 +  * [[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, MLNX_OFED only supports Debian through 11, RHEL through 8, and Ubuntu through 20.04, **OR** ConnectX-4 or newer cards only. The drivers built into Linux still recognize and work with ConnectX-3 and Connect-IB, but the kernel drivers packaged won'even recognize the cards. They just show up as unclaimed PCI devices.+For hardware support, Mellanox provides MLNX_OFED, an overlay for several distributions. Unfortunately, MLNX_OFED only supports Debian through 11, RHEL through 8, and Ubuntu through 20.04, **OR** ConnectX-4 or newer cards only. The drivers built into Linux still recognize and work with ConnectX-3 and Connect-IB, but the kernel drivers in MLNX_OFED don't. They just show up as unclaimed PCI devices.
  
 ^ Version ^ Minimum hardware ^ Debian ^ Ubuntu ^ OpenSM version ^ ^ Version ^ Minimum hardware ^ Debian ^ Ubuntu ^ OpenSM version ^
Line 96: Line 102:
  
 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's configuration has that partition's membership set for "partial" or "both", the Linux host will not be able to connect to everything on that subnet, or possibly //anything// on that subnet, regardless of which value you use. 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's configuration has that partition's membership set for "partial" or "both", the Linux host will not be able to connect to everything on that subnet, or possibly //anything// on that subnet, regardless of which value you use.
- 
-It's worth finding out if Netplan can manage IB child interfaces. 
  
 ====Connected vs. Datagram==== ====Connected vs. Datagram====
Line 123: Line 127:
 =====SR-IOV===== =====SR-IOV=====
  
-Do not try to use SR-IOV with ConnectX-3 cards. It doesn't work. These instructions are for the Connect-IB and ConnectX-4 cards. 
 ====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 133: Line 136:
     SRIOV_EN                                    True(1)     SRIOV_EN                                    True(1)
  
-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't tried large numbers of VFs. The hardware upper limit is 63 for Connect-IB and 127 for ConnectX-3. Any number of system components could impose lower limits. For example, my consumer boards that are SR-IOV capable can only have VFs on port 1, not on port 2; the EPYC server system can create VFs on both ports. I don't expect to need so many guests with IOV networking anyway...+I haven't tried large numbers of VFs. The hardware upper limit is 63 for Connect-IB and 127 for ConnectX-3. Any number of system components could impose lower limits. I don't expect to need so many guests with IOV networking anyway...
  
-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's a way to configure the driver so this becomes the default setting. 
- 
-  # echo 0 > /sys/class/infiniband/ibp13s0f0/device/sriov_drivers_autoprobe 
-  # echo 0 > /sys/class/infiniband/ibp13s0f1/device/sriov_drivers_autoprobe 
- 
-If it works, there will be new PCI devices as well as VFs listed under `ip link`: 
- 
-  # echo 7 > /sys/class/infiniband/ibp6s0f0/device/sriov_numvfs # no output on success; check dmesg for interesting but probably useless messages. 
-  # 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: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 
-      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 
-  2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 
-      link/ether 3c:ec:ef:6d:10:62 brd ff:ff:ff:ff:ff:ff 
-  3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 
-      link/ether 3c:ec:ef:6d:10:63 brd ff:ff:ff:ff:ff:ff 
-  4: ib0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 4092 qdisc fq_codel state UP mode DEFAULT group default qlen 256 
-      link/infiniband 80:00:00:29:fe:80:00:00:00:00:00:00:58:49:56:0e:53:b7:0b:01 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff 
-      vf 0     link/infiniband 80:00:00:29:fe:80:00:00:00:00:00:00:58:49:56:0e:53:b7:0b:01 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 00:00:00:00:00:00:00:00, PORT_GUID 00:00:00:00:00:00:00:00, link-state disable, trust off, query_rss off 
-      vf 1     link/infiniband 80:00:00:29:fe:80:00:00:00:00:00:00:58:49:56:0e:53:b7:0b:01 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 00:00:00:00:00:00:00:00, PORT_GUID 00:00:00:00:00:00:00:00, link-state disable, trust off, query_rss off 
-      vf 2     link/infiniband 80:00:00:29:fe:80:00:00:00:00:00:00:58:49:56:0e:53:b7:0b:01 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 00:00:00:00:00:00:00:00, PORT_GUID 00:00:00:00:00:00:00:00, link-state disable, trust off, query_rss off 
-      vf 3     link/infiniband 80:00:00:29:fe:80:00:00:00:00:00:00:58:49:56:0e:53:b7:0b:01 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 00:00:00:00:00:00:00:00, PORT_GUID 00:00:00:00:00:00:00:00, link-state disable, trust off, query_rss off 
-      vf 4     link/infiniband 80:00:00:29:fe:80:00:00:00:00:00:00:58:49:56:0e:53:b7:0b:01 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 00:00:00:00:00:00:00:00, PORT_GUID 00:00:00:00:00:00:00:00, link-state disable, trust off, query_rss off 
-      vf 5     link/infiniband 80:00:00:29:fe:80:00:00:00:00:00:00:58:49:56:0e:53:b7:0b:01 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 00:00:00:00:00:00:00:00, PORT_GUID 00:00:00:00:00:00:00:00, link-state disable, trust off, query_rss off 
-      vf 6     link/infiniband 80:00:00:29:fe:80:00:00:00:00:00:00:58:49:56:0e:53:b7:0b:01 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 00:00:00:00:00:00:00:00, PORT_GUID 00:00:00:00:00:00:00:00, link-state disable, trust off, query_rss off 
-  5: ib1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 4092 qdisc fq_codel state DOWN mode DEFAULT group default qlen 256 
-      link/infiniband 80:00:00:28:fe:80:00:00:00:00:00:00:58:49:56:0e:53:b7:0b:09 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff 
- 
-====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't tested this. 
- 
-Configuration is managed in /etc/rc.local. 
 =====Upper-Layer Protocols (ULPs)===== =====Upper-Layer Protocols (ULPs)=====
 RDMA opens all kinds of possibilities for RDMA-aware protocols to be amazing and fast. They probably all deserve their own pages. RDMA opens all kinds of possibilities for RDMA-aware protocols to be amazing and fast. They probably all deserve their own pages.
Line 200: 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 208: Line 164:
   * See [[NVMe-oF]] for using NVMe over InfiniBand.   * See [[NVMe-oF]] for using NVMe over InfiniBand.
   * [[SRP]] is fast but the documentation is a joke.   * [[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. None of my hardware has VXLAN offload support.+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 Pro, ConnectX-4, and newer Mellanox cards have VXLAN offloading support, but only for Ethernet ports. So VXLAN overlays are always going to be done by the CPU. They're still decently fast.
  
   * 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 232: Line 191:
  
 Note: The Infiniband MTU is 4k; IPoIB takes 4 bytes and VXLAN takes 50, leaving a max MTU of 4042. Note: The Infiniband MTU is 4k; IPoIB takes 4 bytes and VXLAN takes 50, leaving a max MTU of 4042.
 +
 ====Multimedia==== ====Multimedia====
 Yeah, someday I want to throw video frames around. There's an RFC or ISO standard for that, IIRC. There's also lgproxy, which is RDMA-aware. Yeah, someday I want to throw video frames around. There's an RFC or ISO standard for that, IIRC. There's also lgproxy, which is RDMA-aware.
Line 237: Line 197:
 I also want to throw audio frames around with "no latency added". Someday, someday, someday. I also want to throw audio frames around with "no latency added". Someday, someday, someday.
  
-=====GUIDs===== +====GUIDs==== 
-====Installed==== +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. 
-  * b8cef603004ebc86 - southpark ConnectX-4 FCAT +
-  * 0002c90300b37f10 - shark ConnectX-3 FCBT with no date on the label +
-  * 5849560e53660101 - duckling Connect-IB +
-====Not Installed==== +
-  * 5849560e53b70b01 - Connect-IB +
-  * 5849560e59150301 - Connect-IB +
-  * 7cfe900300a0a080 - Connect-IB +
-  * (there are several more uninstalled Connect-IB cards) +
-  * f4521403002c18b0 - uninstalled ConnectX-3 dated 2014-01-29+
   * 001175000079b560 - uninstalled qib   * 001175000079b560 - uninstalled qib
   * 001175000079b856 - uninstalled qib   * 001175000079b856 - uninstalled qib
  
nndocs/infiniband.1784691639.txt.gz · Last modified: 2026/07/22 03:40 by naptastic