Skip to main content

Cornelis Technical Documentation

5.3.7. Persist the SR-IOV Configuration (Recommended)

SR-IOV settings do not persist across reboots. To persist the configuration:

  1. Create a configuration file in /etc/modprobe.d/ to set the max_num_vfs module parameter.

    For example, create /etc/modprobe.d/hfi1_sriov.conf containing:

    options hfi1 max_num_vfs=7
  2. Configure a systemd unit or udev rule to write the desired value to sriov_numvfs at boot.

    Example systemd service (/etc/systemd/system/sriov-CN5000.service):

    [Unit]
    Description=Enable SR-IOV on CN5000 PF 0000:41:00.0
    After=network.target
    
    [Service]
    Type=oneshot
    ExecStart=/bin/sh -c 'echo 7 > /sys/bus/pci/devices/0000:41:00.0/sriov_numvfs'
    RemainAfterExit=yes
    
    [Install]
    WantedBy=multi-user.target
  3. Enable the service:

    systemctl daemon-reload
    systemctl enable sriov-cnCN5000.service