Mellanox ConnectX-3 Vfio automatic assignment problem

pilgrimage

Member
Oct 17, 2021
65
2
13
45
I am activating the Mellanox ConnectX-3 Card Sr-iov with the following steps. Except for the PF card, I can transfer vfio with the following steps. But when I wanted to do this automatically, I couldn't do it. What am I missing? I need your support on this issue.

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on pcie_acs_override=downstream,multifunction"

update-grub

nano /etc/modprobe.d/vfio.conf

options vfio-pci ids=15b3:1004. (VF id )

echo "devices/pci0000:01:00.0/sriov_numvfs = 4" > /etc/sysfs.d/sriov.conf

echo "options mlx4_core port_type_array=2,2 num_vfs=4 probe_vf=4" > /etc/modprobe.d/mlx4.conf

update-initramfs -u -k all


I restart, the cards are allocated to VFs and it's fine but the VFs are still using mlx4_core.

But I need to manually do the following after every restart


echo 0000:01:00.1 > /sys/bus/pci/devices/0000:01:00.1/driver/unbind
echo 0000:01:00.2 > /sys/bus/pci/devices/0000:01:00.2/driver/unbind
echo 0000:01:00.3 > /sys/bus/pci/devices/0000:01:00.3/driver/unbind
echo 0000:01:00.4 > /sys/bus/pci/devices/0000:01:00.4/driver/unbind



echo 15b3 1004 > /sys/bus/pci/drivers/vfio-pci/new_id. I only have to do it once. After the restart I only do the following parts.
echo 0000:01:00.1 > /sys/bus/pci/drivers/vfio-pci/bind
echo 0000:01:00.2 > /sys/bus/pci/drivers/vfio-pci/bind
echo 0000:01:00.3 > /sys/bus/pci/drivers/vfio-pci/bind
echo 0000:01:00.4 > /sys/bus/pci/drivers/vfio-pci/bin


Mellanox Vf's are assigned to the Vfio drive without any problems. Mlx4_Core proxmox does not remain host related. PF (except Mellanox which is physical)

I need to do this after every restart. What am I missing that vfio is not automatically transferred to VFs.

Thankyou for support.
 
Last edited: