TL;DR: If you have a ConnectX-3 and a recent kernel, and are using SR-IOV successfully, what options are you using?
I have a CX354A-FCBT and I have not gotten SR-IOV to work at all. I'm using inbox drivers since old MLNX-OFED drivers won't work with modern kernels and new MLNX-OFED drivers don't support ConnectX-3. My current kernel version is 7.0.14 with one patch applied that gives (basically) -march=native; otherwise it's vanilla.
Here is mlxconfig -q for the card:
Device #1:
----------
Device type: ConnectX3
Device: 0e:00.0
Configurations: Next Boot
SRIOV_EN True(1)
NUM_OF_VFS 16
LINK_TYPE_P1 IB(1)
LINK_TYPE_P2 ETH(2)
LOG_BAR_SIZE 3
BOOT_PKEY_P1 0
BOOT_PKEY_P2 0
BOOT_OPTION_ROM_EN_P1 False(0)
BOOT_VLAN_EN_P1 False(0)
BOOT_RETRY_CNT_P1 0
LEGACY_BOOT_PROTOCOL_P1 PXE(1)
BOOT_VLAN_P1 0
BOOT_OPTION_ROM_EN_P2 True(1)
BOOT_VLAN_EN_P2 False(0)
BOOT_RETRY_CNT_P2 0
LEGACY_BOOT_PROTOCOL_P2 iSCSI(2)
BOOT_VLAN_P2 0
IP_VER_P1 IPv6(1)
IP_VER_P2 IPv6(1)
CQ_TIMESTAMP True(1)
So far so good: the firmware is configured for SR-IOV. But when I enable VFs in the driver, no interfaces on the card will come up; no traffic gets in or out. Here are the lines I have tried in /etc/modprobe.d/mlx4_core.conf:
# This breaks things
# options mlx4_core num_vfs=0,0,7 probe_vf=0,0,1 port_type_array=1,2
# This also breaks things
# options mlx4_core probe_vf=0 num_vfs=7
# This also breaks things
# options mlx4_core debug_level=1 port_type_array=1,2 num_vfs=0,8,0 probe_vf=0,0,0
# I don't actually know what this option does but I think it's interfering with SR-IOV
# log_num_mgm_entry_size=-1
They're all commented out since, y'know, I like to actually use the card. But SR-IOV would be really helpful, and I know the platform supports it since SR-IOV works just fine with Connect-IB and ConnectX-4 cards.
If I try to create VFs after the card has been initialized:
[/sys/bus/pci/devices/0000:0e:00.0]# echo 16 > sriov_numvfs
-bash: echo: write error: No such file or directory
...I expected this to fail but ENOENT isn't what I expected. Whatever. The official documentation is pretty much all wrong. I think maybe I need different options for mlx4_core but even reading the source code doesn't tell me enough.
Thanks in advance,
Nap
I have a CX354A-FCBT and I have not gotten SR-IOV to work at all. I'm using inbox drivers since old MLNX-OFED drivers won't work with modern kernels and new MLNX-OFED drivers don't support ConnectX-3. My current kernel version is 7.0.14 with one patch applied that gives (basically) -march=native; otherwise it's vanilla.
Here is mlxconfig -q for the card:
Device #1:
----------
Device type: ConnectX3
Device: 0e:00.0
Configurations: Next Boot
SRIOV_EN True(1)
NUM_OF_VFS 16
LINK_TYPE_P1 IB(1)
LINK_TYPE_P2 ETH(2)
LOG_BAR_SIZE 3
BOOT_PKEY_P1 0
BOOT_PKEY_P2 0
BOOT_OPTION_ROM_EN_P1 False(0)
BOOT_VLAN_EN_P1 False(0)
BOOT_RETRY_CNT_P1 0
LEGACY_BOOT_PROTOCOL_P1 PXE(1)
BOOT_VLAN_P1 0
BOOT_OPTION_ROM_EN_P2 True(1)
BOOT_VLAN_EN_P2 False(0)
BOOT_RETRY_CNT_P2 0
LEGACY_BOOT_PROTOCOL_P2 iSCSI(2)
BOOT_VLAN_P2 0
IP_VER_P1 IPv6(1)
IP_VER_P2 IPv6(1)
CQ_TIMESTAMP True(1)
So far so good: the firmware is configured for SR-IOV. But when I enable VFs in the driver, no interfaces on the card will come up; no traffic gets in or out. Here are the lines I have tried in /etc/modprobe.d/mlx4_core.conf:
# This breaks things
# options mlx4_core num_vfs=0,0,7 probe_vf=0,0,1 port_type_array=1,2
# This also breaks things
# options mlx4_core probe_vf=0 num_vfs=7
# This also breaks things
# options mlx4_core debug_level=1 port_type_array=1,2 num_vfs=0,8,0 probe_vf=0,0,0
# I don't actually know what this option does but I think it's interfering with SR-IOV
# log_num_mgm_entry_size=-1
They're all commented out since, y'know, I like to actually use the card. But SR-IOV would be really helpful, and I know the platform supports it since SR-IOV works just fine with Connect-IB and ConnectX-4 cards.
If I try to create VFs after the card has been initialized:
[/sys/bus/pci/devices/0000:0e:00.0]# echo 16 > sriov_numvfs
-bash: echo: write error: No such file or directory
...I expected this to fail but ENOENT isn't what I expected. Whatever. The official documentation is pretty much all wrong. I think maybe I need different options for mlx4_core but even reading the source code doesn't tell me enough.
Thanks in advance,
Nap