Direct SR-IOV Verdict:

To enable SR-IOV on a 100GbE Mellanox ConnectX-5 adapter in Proxmox VE 8, enable IOMMU in GRUB, set SRIOV_EN=1 and NUM_OF_VFS=8 via mstflint/mlxconfig, and bind Virtual Functions (VFs) persistently using udev or systemd network configurations. This passes near-bare-metal 100Gbps line rate and RDMA offload directly to virtual machines with sub-2-microsecond latency.

When orchestrating high-density storage clusters and virtualized virtualization nodes, pair your SR-IOV virtual functions with low-latency network fabrics. For step-by-step NVMe clustering instructions, read our architectural guide on NVMe Over Fabrics: RoCEv2 vs TCP in Homelab Clusters.

When operating a high-density 100GbE enterprise homelab or private cloud node on Proxmox VE 8.x, standard software-defined switching—such as Linux bridges (vmbr0) or Open vSwitch—inevitably hits a hard performance wall. At line-rate speeds exceeding 40Gbps, kernel-level packet processing, CPU interrupt handling, and memory copying introduce severe CPU bottlenecks. To achieve bare-metal throughput, sub-microsecond latency, and offload CPU cycles for storage and AI/ML workloads, implementing Single Root I/O Virtualization (SR-IOV) on Mellanox/NVIDIA ConnectX-5 adapters is mandatory.

Jay Tech’s Systems Architecture Verdict:

Standard Linux bridges (vmbr0) cap 100GbE throughput at 25-35 Gbps due to CPU interrupt saturation. To achieve true 98+ Gbps line-rate throughput and sub-1.8µs latency, enable SR-IOV on your ConnectX-5 adapter by flashing firmware via mstflint, setting SRIOV_EN=1 with mlxconfig, and binding virtual functions directly to guest VMs with vfio-pci for hardware RoCEv2 RDMA acceleration.

In this advanced system architecture masterclass, we will surgically dissect the hardware configuration, firmware modification, persistent systemd provisioning, and Proxmox VE hypervisor integration required to run 100GbE SR-IOV smoothly on Mellanox ConnectX-5 (MCX515A-CCAT / MCX516A-CDAT) network adapters.

How to Enable SR-IOV on a 100GbE ConnectX-5 Ethernet Adapter

Enabling SR-IOV on enterprise-grade NVIDIA Mellanox ConnectX-5 adapters requires interacting directly with the network adapter’s internal configuration space using the Mellanox Software Tools (MST). By default, out-of-the-box firmware often ships with SR-IOV disabled or constrained to a low virtual function count to conserve PCIe memory window space.

Execute the following diagnostic and configuration lifecycle directly on your Proxmox VE host terminal to unlock hardware virtualization features:

# 1. Update package lists and install required build tools and Mellanox MST utilities
apt-get update && apt-get install -y dkms build-essential pciutils libnl-route-3-dev libibverbs-dev

# 2. Download and install the Mellanox OFED / MST utilities package if not already present
# (Alternatively, use mstflint package provided by Debian/Proxmox repositories)
apt-get install -y mstflint ibverbs-utils

# 3. Start the Mellanox System Tools daemon to map device nodes under /dev/mst/
mst start

# 4. Verify that your ConnectX-5 adapter is detected and note the device path (e.g., mt4119_pciconf0)
mst status

Once the MST daemon is running and the adapter is isolated, you must inspect the current non-volatile configuration parameters stored in the adapter’s flash memory. Run the configuration query command:

# Query current firmware configuration parameters
mlxconfig -d /dev/mst/mt4119_pciconf0 q

Look for parameters such as SRIOV_EN, NUM_OF_VFS, and LINK_TYPE_P1 / LINK_TYPE_P2 in the output. To unleash hardware virtualization and configure the adapter ports for raw Ethernet performance (RoCEv2 capable), execute the configuration write commands:

# Enable SR-IOV and allocate 8 Virtual Functions (VFs) per physical port
mlxconfig -d /dev/mst/mt4119_pciconf0 set SRIOV_EN=1 NUM_OF_VFS=8

# Explicitly set port link types to Ethernet (2 = Ethernet, 1 = InfiniBand)
mlxconfig -d /dev/mst/mt4119_pciconf0 set LINK_TYPE_P1=2 LINK_TYPE_P2=2
Critical Hardware Warning: Modifying mlxconfig parameters updates the adapter’s onboard NVRAM. A warm reboot is insufficient for PCIe configuration space registers to rebuild their memory-mapped I/O (MMIO) allocation maps. You must perform a full cold power cycle (shutdown host, cut AC power for 10 seconds, then boot up) for the motherboard BIOS and Proxmox kernel to correctly enumerate the newly instantiated Virtual Functions.

Instantiating Virtual Functions Persistently in Proxmox VE 8.x

After performing a cold reboot following your mlxconfig adjustment, the Linux kernel (specifically the mlx5_core driver) detects the physical functions (PFs). However, relying solely on manual sysfs writes to instantiate Virtual Functions across reboots leads to race conditions during system startup. We must construct a clean, deterministic systemd initialization service.

First, identify your exact physical interface names using ip link show or lshw -C network. For our implementation, assume our dual-port ConnectX-5 primary interface is enp1s0f0.

Create a dedicated systemd service file at /etc/systemd/system/sriov-connectx5.service using your preferred text editor:

[Unit]
Description=Configure ConnectX-5 SR-IOV Virtual Functions and MAC Policies
After=network.target network-online.target
Wants=network-online.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c '\
  echo 8 > /sys/class/net/enp1s0f0/device/sriov_numvfs; \
  sleep 2; \
  ip link set enp1s0f0 vf 0 mac 52:54:00:12:34:56 spoofchk off trust on; \
  ip link set enp1s0f0 vf 1 mac 52:54:00:12:34:57 spoofchk off trust on; \
  ip link set enp1s0f0 vf 2 mac 52:54:00:12:34:58 spoofchk off trust on; \
  ip link set enp1s0f0 vf 3 mac 52:54:00:12:34:59 spoofchk off trust on; \
'
ExecStop=/bin/bash -c '\
  echo 0 > /sys/class/net/enp1s0f0/device/sriov_numvfs; \
'

[Install]
WantedBy=multi-user.target

Enable and start this service immediately to ensure persistence across all future kernel upgrades and host reboots:

# Reload systemd manager to recognize the new service
systemctl daemon-reload

# Enable service to run at boot
systemctl enable sriov-connectx5.service

# Trigger the service manually to test instantiation
systemctl start sriov-connectx5.service

# Verify virtual functions have been successfully created and bound
ip link show enp1s0f0

You will notice multiple virtual function interfaces generated beneath the physical interface (e.g., enp1s0f1 through enp1s0f8). Each VF possesses its own PCI Express address, allowing direct pass-through to virtual machines via the Proxmox hypervisor.

ConnectX Adapter Family: 25GbE to 100GbE Homelab Matrix

Selecting the right Mellanox adapter for a modern Proxmox VE homelab involves balancing PCIe lane saturation, SR-IOV capabilities, hardware offloads, and secondary market pricing. The comparison matrix below outlines the critical architectural differences across the ConnectX-4 Lx, ConnectX-5, and ConnectX-6 Dx families.

Metric / Feature ConnectX-4 Lx (25GbE) ConnectX-5 EN (100GbE) ConnectX-6 Dx (100/200GbE)
PCIe Gen & Lane Width PCIe Gen3 x8 PCIe Gen3/Gen4 x16 PCIe Gen4 x16
Max Virtual Functions (VFs) Up to 127 VFs per port Up to 127 VFs per port Up to 256 VFs total
RoCE Support RoCEv1 / RoCEv2 (Basic) Advanced RoCEv2, Tag Matching Hardware RoCE with Congestion Control
PCIe Atomics & Latency Limited, ~2.5µs latency Full Atomics, Sub-1.8µs latency Optimized, Sub-1.0µs latency
TDP & Active Cooling ~12W – 15W (Passive acceptable) ~18W – 22W (Server chassis airflow required) ~25W – 30W (High static pressure needed)
eBay Second-Hand Market Pricing $35 – $55 USD $160 – $210 USD $420 – $550+ USD

Assigning SR-IOV Virtual Functions to Proxmox Virtual Machines

With your Virtual Functions successfully instantiated and persistent via systemd, you can now assign individual VFs directly into your Proxmox QEMU/KVM virtual machines using PCIe device passthrough. This grants the guest operating system native control over the virtual NIC while bypassing the hypervisor’s software bridge entirely.

First, identify the exact PCI bus address of your desired Virtual Function. Run:

# List PCI devices and grep for Mellanox ConnectX-5 virtual functions
lspci -nn | grep -i mellanox

You will see output similar to:

01:00.0 Ethernet controller [0200]: Mellanox Technologies ConnectX-5 Ex [15b3:1018]
01:00.1 Eth controller [0200]: Mellanox Technologies ConnectX-5 Virtual Function [15b3:1016]
01:00.2 Eth controller [0200]: Mellanox Technologies ConnectX-5 Virtual Function [15b3:1016]

To assign Virtual Function 1 (PCI address 0000:01:00.2) to Virtual Machine ID 105, execute the following command on your Proxmox host shell:

# Attach the SR-IOV Virtual Function directly to VM 105 with PCIe passthrough enabled
qm set 105 -hostpci0 0000:01:00.2,pcie=1,rombar=0
Pro-Tip for Enterprise Deployments: Setting rombar=0 prevents the guest operating system from attempting to initialize the Option ROM of the virtual function during boot, significantly decreasing guest boot times and avoiding potential memory mapping conflicts in virtualized UEFI environments.

Alternatively, you can configure this directly through the Proxmox Web UI:

  1. Navigate to your target VM (e.g., VM 105) in the Proxmox web interface.
  2. Click on Hardware > Add > PCI Device.
  3. Select Use Device and choose your Mellanox ConnectX-5 Virtual Function from the dropdown list.
  4. Check the boxes for PCI-express and uncheck Primary GPU (if applicable). Click Add.

Guest OS Configuration and RoCEv2 Performance Validation

Once you boot your Proxmox virtual machine, the Linux kernel (assuming a modern Ubuntu 22.04/24.04, Debian 12, or RHEL 9 guest) will automatically load the mlx5_core driver for the passed-through PCIe device.

Verify that the interface is active inside the guest OS and test raw throughput using iperf3:

# Inside the Guest VM: Check interface naming and link status
ip link show

# Run an iperf3 multi-stream TCP test against your high-speed target storage node
iperf3 -c 10.100.1.50 -P 8 -t 30

Because the VM is communicating directly with the ConnectX-5 ASIC hardware via SR-IOV, you should observe line-rate throughput approaching 94-98 Gbps with minimal CPU utilization on both the Proxmox hypervisor host and the guest virtual machine.

Frequently Asked Questions

How do I enable SR-IOV on a ConnectX-5 100GbE adapter?

To enable SR-IOV on a ConnectX-5 adapter, you must initialize the Mellanox software tools with mst start, query the device configuration using mlxconfig -d /dev/mst/mt4119_pciconf0 q, and set the firmware parameters via mlxconfig -d /dev/mst/mt4119_pciconf0 set SRIOV_EN=1 NUM_OF_VFS=8. A mandatory cold reboot is required afterward for the host motherboard to allocate PCIe MMIO space for the virtual functions.

Can you live migrate Proxmox VMs using Mellanox SR-IOV virtual functions?

Standard PCIe pass-through and SR-IOV Virtual Functions bind a physical hardware endpoint directly to a guest VM, which breaks native Proxmox QEMU live migration because the destination host does not share that exact hardware state. If live migration is a strict requirement for your cluster, you should utilize VirtIO-Net with multiqueue backed by Open vSwitch or Linux bridges, or implement network-level failover bonding inside the guest operating system.

What is the difference between ConnectX-4 and ConnectX-5 for 100GbE homelabs?

While both adapters support 100GbE speeds, the ConnectX-4 Lx is limited to 25GbE per port in most common configurations, whereas the ConnectX-5 EN delivers true dual-port 100GbE with PCIe Gen3/Gen4 x16 lanes. Furthermore, ConnectX-5 introduces hardware-accelerated tag matching, advanced atomic operations, and lower round-trip latency (sub-1.8µs), making it significantly more capable for NVMe-oF storage fabrics and high-performance computing clusters.

Why does Proxmox vmbr0 bridge bottleneck at 100GbE?

The Linux bridge (vmbr0) processes network packets entirely within the host CPU kernel space. At 100GbE line rates, packet arrival rates exceed 14 million packets per second. This completely saturates CPU interrupt requests (IRQs), forcing context switching and memory copies that overwhelm even high-core-count enterprise CPUs, capping software-bridged throughput around 25-35 Gbps unless hardware offloads or SR-IOV are implemented.