ConnectX-3/-4 RDMA bring-up runbook.
Goal for the first physical test: **load voltron.ko and establish an RDMA RC connection between two nodes (or loopback on one), exchanging a HELLO message.** This proves the in-kernel verbs data path before we layer syscall forwarding.
kernel-src/ with the config we set: INFINIBAND=y, INFINIBAND_ADDR_TRANS=y, CONFIGFS_FS=y, PSI=y, plus the Mellanox drivers: MLX4_CORE/MLX4_EN/MLX4_INFINIBAND=m (CX-3) and MLX5_CORE/MLX5_CORE_EN=y/MLX5_INFINIBAND=m (CX-4). (RDMA_RXE=m kept only as a fallback.)voltron.ko over: ``sh cd src && make KDIR=/lib/modules/$(uname -r)/build # -> voltron.ko iproute2 with rdma subcommand, ibv_devices/rdma-core (optional, for inspection), perftest (optional).# CX-3: sudo modprobe mlx4_ib # pulls mlx4_core + mlx4_en # CX-4: sudo modprobe mlx5_ib # pulls mlx5_core rdma link show # expect e.g. mlx5_0/1 or mlx4_0/1 state ACTIVE ibv_devices # lists the HCA ibstat # link state / rate (optional)
CX-3 ports can be InfiniBand or Ethernet; RoCE needs Ethernet.
ibv_devinfo | grep -i link_layer # want: Ethernet (not InfiniBand) # if it shows InfiniBand, set port type to eth and reload mlx4_core: # echo eth > /sys/bus/pci/devices/<PCI_BDF>/mlx4_port1 # or persist via module param: options mlx4_core port_type_array=2,2
ConnectX-4 is Ethernet/RoCE v2 out of the box — no action.
sudo ip addr add 10.0.0.1/24 dev <mlx-netdev> # node A (use .2 on node B) sudo ip link set <mlx-netdev> up # find the RoCE v2 GID bound to that IP (rdma_cm selects it via routing): ibv_devinfo -v | grep -iE 'GID|link_layer' # or: show_gids (rdma-core)
Use these IPs as the node addr in the steps below. rdma_cm (RoCE v2) will resolve the right GID from the source IP route automatically.
Fabric: back-to-back or through a lossless (PFC/ECN) switch. For a 2-node back-to-back cable no switch config is needed.
Fallback only if hardware is unavailable: SoftRoCE (modprobe rdma_rxe; rdma link add rxe0 type rxe netdev <dev>).
sudo insmod voltron.ko dmesg | tail # voltron: rdma transport ready # voltron: loaded v0.0.1 (phase 0: sysfs + node table + cgroup policy) ls /sys/kernel/voltron/ # version default_mode cluster/ policy/ ls /sys/kernel/voltron/cluster/ # add_node del_node local_node_id rdma_listen nodes/
Node talks to itself over rxe/RoCE on 127-style or its own IP.
# start listener on port 18515 echo 18515 | sudo tee /sys/kernel/voltron/cluster/rdma_listen # register "self" as a peer (id 1), using this host's RDMA-capable IP echo "1 192.168.1.10 x" | sudo tee /sys/kernel/voltron/cluster/add_node # connect to it on the listener port echo 18515 | sudo tee /sys/kernel/voltron/cluster/nodes/1/connect dmesg | tail # expect: node 1: connected ... / incoming connection established # send a HELLO echo "hello from node 1" | sudo tee /sys/kernel/voltron/cluster/nodes/1/send dmesg | tail # expect: node X recv (18 bytes): hello from node 1 # and: node 1 send complete
On node B (10.0.0.2) — the listener / deputy side:
sudo insmod voltron.ko echo 18515 | sudo tee /sys/kernel/voltron/cluster/rdma_listen
On node A (10.0.0.1) — the initiator:
sudo insmod voltron.ko echo "2 10.0.0.2 x" | sudo tee /sys/kernel/voltron/cluster/add_node echo 18515 | sudo tee /sys/kernel/voltron/cluster/nodes/2/connect echo "hi B" | sudo tee /sys/kernel/voltron/cluster/nodes/2/send
Expected: on A dmesg shows node 2: connection established (client) and send complete; on B dmesg shows incoming connection established (server) and recv (… bytes): hi B.
cd userspace/voltron-ctld && make sudo ./voltron-ctld -c voltron-ctld.conf # pushes local_node_id + peers to sysfs # (manual connect/send still via sysfs for this bring-up)
sudo rmmod voltron # remove SoftRoCE link if used: sudo rdma link delete rxe0
connect returns -ENODEV/times out → no ACTIVE rdma link, or firewall on the rdma_cm CM port (UDP 4791 for RoCE v2); check rdma link show, MTU, same subnet.insmod fails Invalid module format → module built against a different kernel than booted; rebuild with the right KDIR.recv log → RECV not reposted / wrong lkey; capture full dmesg.rdma_bind_addr fails → the chosen IP isn't backed by an RDMA device; bind the rxe link to the right netdev.docs/PHASE1.md) is not wired yet.