Mellanox Technologies MT27800 Family [ConnectX-5],create 8 vf failed

I am in an environment with Ubuntu 22.04 and kernel 6.2.0, using a Mellanox Technologies MT27800 Family [ConnectX-5] network card. The PCI information is 05:00.0 and 05:00.1. When I use the command “echo 8 > devices/0000:05:00.0/sriov_numvfs”, it seems that the creation of the last two Virtual Functions (VFs) fails. Here is the dmesg information.

[ 161.794111] mlx5_core 0000:05:00.6 enp5s0f0v4: Link down
[ 161.795555] mlx5_core 0000:05:00.7: enabling device (0000 → 0002)
[ 161.795632] mlx5_core 0000:05:00.7: firmware version: 16.35.4030
[ 161.975358] mlx5_core 0000:05:00.7: Rate limit: 127 rates are supported, range: 0Mbps to 24414Mbps
[ 161.988787] mlx5_core 0000:05:00.7: Assigned random MAC address 86:c5:cd:ec:81:80
[ 162.140701] mlx5_core 0000:05:00.7: Supported tc offload range - chains: 1, prios: 1
[ 162.144428] mlx5_core 0000:05:00.7: MLX5E: StrdRq(1) RqSz(8) StrdSz(2048) RxCqeCmprss(0 basic)
[ 162.153478] mlx5_core 0000:05:00.7 enp5s0f0v5: renamed from eth0
[ 162.198486] pci 0000:05:01.0: [15b3:1018] type 00 class 0x020000
[ 162.202577] pci 0000:05:01.0: Adding to iommu group 23
[ 162.294831] mlx5_core 0000:05:00.7 enp5s0f0v5: Link down
[ 162.296103] mlx5_core 0000:05:01.0: firmware version: 16.35.4030
[ 223.304643] mlx5_core 0000:05:01.0: wait_func:1132:(pid 2912): ENABLE_HCA(0x104) timeout. Will cause a leak of a command resource
[ 223.304649] mlx5_core 0000:05:01.0: mlx5_function_setup:1138:(pid 2912): enable hca failed
[ 223.315514] mlx5_core 0000:05:01.0: probe_one:1741:(pid 2912): mlx5_init_one failed with error code -110
[ 223.315729] mlx5_core: probe of 0000:05:01.0 failed with error -110
[ 223.315750] pci 0000:05:01.1: [15b3:1018] type 00 class 0x020000
[ 223.319636] pci 0000:05:01.1: Adding to iommu group 24
[ 223.320081] mlx5_core 0000:05:01.1: firmware version: 16.35.4030
[ 284.327410] mlx5_core 0000:05:01.1: wait_func:1132:(pid 2912): ENABLE_HCA(0x104) timeout. Will cause a leak of a command resource
[ 284.327416] mlx5_core 0000:05:01.1: mlx5_function_setup:1138:(pid 2912): enable hca failed
[ 284.338325] mlx5_core 0000:05:01.1: probe_one:1741:(pid 2912): mlx5_init_one failed with error code -110
[ 284.338538] mlx5_core: probe of 0000:05:01.1 failed with error -110
[ 376.300777] mlx5_core 0000:05:00.1: E-Switch: Enable: mode(LEGACY), nvfs(4), active vports(5)
[ 376.408529] pci 0000:05:01.2: [15b3:1018] type 7f class 0xffffff
[ 376.408535] pci 0000:05:01.2: unknown header type 7f, ignoring device

It appears that the PCI slot numbers of the last two VFs are different from those of the previous six VFs.

Hello @ai_bj and welcome to the NVIDIA developer forums.

I took the liberty of moving your post to our Network section. I think it might be easier to find help there.

Thanks!