Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| infiniband [2017/01/19 01:23] – EnjiCooper | infiniband [2019/04/16 22:23] (current) – Update script for building IB modules, add script for upgrading JasonBacon | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| InfiniBand (IB) is a high-speed (10-300Gb/ | InfiniBand (IB) is a high-speed (10-300Gb/ | ||
| - | InfiniBand is supported on most major operating systems: Windows, Linux, (Open)Solaris, | + | InfiniBand is supported on most major operating systems: Windows, Linux, (Open)Solaris, |
| ====== Infiniband in FreeBSD ====== | ====== Infiniband in FreeBSD ====== | ||
| Line 9: | Line 9: | ||
| The OFED stack was merged in March 2011 ([[http:// | The OFED stack was merged in March 2011 ([[http:// | ||
| - | Proprietary IB stacks are known to exist outside of %%FreeBSD%% proper. In particular, three major storage appliance vendors -- EMC/Isilon, NetApp, and Panasas -- ship products based on %%FreeBSD%% and use InfiniBand for high-speed interconnects. | + | Proprietary IB stacks are known to exist outside of %%FreeBSD%% proper. In particular, three major storage appliance vendors -- [[http:// |
| ====== Infiniband hardware support by release ====== | ====== Infiniband hardware support by release ====== | ||
| Line 18: | Line 18: | ||
| | %%ConnectX%%-2 | mlx4 | Yes | Yes | Yes | | | | %%ConnectX%%-2 | mlx4 | Yes | Yes | Yes | | | ||
| | %%ConnectX%%-3/ | | %%ConnectX%%-3/ | ||
| - | | %%ConnectX%%-4 (Eth) | mlx5 | No | Yes | Yes | | | + | | %%ConnectX%%-4 (Eth) | mlx5 | Yes | Yes | Yes | Available in 9.4+/ |
| - | | %%ConnectX%%-4 (IB) | mlx5 | No | Not Yet | Not Yet | In development | + | | %%ConnectX%%-4 (IB) | mlx5 | Yes | Yes | Yes | Available in 9.4+/ |
| - | | Connect-IB | mlx5 | No | Not Yet | Not Yet | In development | + | | Connect-IB | mlx5 | Yes | Yes | Yes | Available in 9.4+/ |
| ====== Building OFED in FreeBSD ====== | ====== Building OFED in FreeBSD ====== | ||
| Line 45: | Line 45: | ||
| * Run buildkernel/ | * Run buildkernel/ | ||
| + | |||
| + | Note: If your /usr/src tree is newer than your kernel, you must do a buildkernel/ | ||
| + | |||
| + | ===== Userland ===== | ||
| + | |||
| + | * This is no longer necessary as OFED support is on by default now, but is still documented here for those who need to do a buildworld anyway. | ||
| + | |||
| + | - Add '' | ||
| + | - Run buildworld/ | ||
| + | - Set the " | ||
| ===== Kernel Modules ===== | ===== Kernel Modules ===== | ||
| - | As an alternative | + | It is now possible |
| - | Note: If your /usr/src tree is newer than your kernel, | + | As an alternative to building a new kernel, |
| The script below will build, install, and load the appropriate drivers: | The script below will build, install, and load the appropriate drivers: | ||
| Line 57: | Line 67: | ||
| # | # | ||
| - | cd /usr/src/sys/ | + | usage() |
| - | for module in mlx4 ibcore | + | { |
| + | printf " | ||
| + | printf "* Use 4 for ConnectX 3 and earlier, 5 for later HCAs.\n" | ||
| + | printf "* Specify connected if you want to use connected mode ipoib.\n" | ||
| + | exit 1 | ||
| + | } | ||
| + | |||
| + | if [ $# != 2 ]; then | ||
| + | usage | ||
| + | fi | ||
| + | |||
| + | driver_version=$1 | ||
| + | ipoib_mode=$2 | ||
| + | |||
| + | case $ipoib_mode in | ||
| + | datagram) | ||
| + | ;; | ||
| + | |||
| + | connected) | ||
| + | export CFLAGS=" | ||
| + | ;; | ||
| + | |||
| + | *) | ||
| + | usage | ||
| + | ;; | ||
| + | |||
| + | esac | ||
| + | |||
| + | cd /usr/src | ||
| + | make clean # Rebuild all objs in case src was updated | ||
| + | |||
| + | cd sys/ | ||
| + | for module in mlx$driver_version | ||
| + | rm -f / | ||
| cd $module | cd $module | ||
| - | make | + | make clean |
| + | make DEBUG_FLAGS=" | ||
| make install | make install | ||
| + | # Minimize damage if kldload triggers a panic. | ||
| + | # with experimental drivers. | ||
| sync | sync | ||
| kldload $module || true | kldload $module || true | ||
| - | | + | |
| cd .. | cd .. | ||
| done | done | ||
| kldstat | kldstat | ||
| + | cat << EOM | ||
| + | |||
| + | To disable Infiniband support, remove or comment out the following device | ||
| + | loads in / | ||
| + | |||
| + | mlx$driver_version ibcore mlx${driver_version}ib ipoib | ||
| + | |||
| + | EOM | ||
| </ | </ | ||
| - | ===== Userland ===== | + | Following updates to /usr/src, the IB kernel modules can be upgraded using the script below: |
| - | - Add '' | + | < |
| - | | + | #!/bin/sh -e |
| - | - Set the "sys.device.mlx4_coreX.mlx4_portY" | + | |
| + | usage() | ||
| + | { | ||
| + | printf | ||
| + | printf "* Use 4 for ConnectX 3 and earlier, 5 for later HCAs.\n" | ||
| + | printf "* Specify connected if you want to use connected mode ipoib.\n" | ||
| + | exit 1 | ||
| + | } | ||
| + | |||
| + | if [ $# != 2 ]; then | ||
| + | usage | ||
| + | fi | ||
| + | |||
| + | driver_version=$1 | ||
| + | ipoib_mode=$2 | ||
| + | |||
| + | for interface in $(ifconfig | awk -F : '$1 ~ "^ib" | ||
| + | ifconfig $interface down | ||
| + | done | ||
| + | |||
| + | kldunload ipoib mlx${driver_version}ib ibcore mlx$driver_version || true | ||
| + | |||
| + | auto-build-infiniband-modules $1 $2 | ||
| + | |||
| + | for interface in $(ifconfig | awk -F : '$1 ~ "^ib" { print $1 }'); do | ||
| + | ifconfig $interface up | ||
| + | done | ||
| + | </ | ||
| + | |||
| + | Both of these scripts will be included in sysutils/ | ||
| ===== OpenSM ===== | ===== OpenSM ===== | ||