Failed to enable SRIOV for mellanox cx-4

kakan

New Member
Aug 12, 2023
2
0
1
Fail to enable sriov for cx-4 in PVE8, dmesg shows these. And it is work in PVE7.4, maybe cause by the mlx5_core. This link maybe useful, https://git.kernel.org/pub/scm/linu...c?id=6496357aa5f710eec96f91345b9da1b37c3231f6

[ 364.522176] mlx5_core 0000:01:00.0: mlx5_cmd_out_err:779:(pid 3317): QUERY_HCA_CAP(0x100) op_mod(0x40) failed, status bad parameter(0x3), syndrome (0x5add95), err(-22)
[ 364.559520] mlx5_core 0000:01:00.0: mlx5_device_enable_sriov:82:(pid 3317): failed to enable eswitch SRIOV (-22)
[ 364.559534] mlx5_core 0000:01:00.0: mlx5_sriov_enable:168:(pid 3317): mlx5_device_enable_sriov failed : -22
 
Hello All,

I have the same problem with Proxmox 8 latest version with Mellnox mlx5.

pveversion
pve-manager/8.0.3/bbf3993334bfa916 (running kernel: 6.2.16-3-pve)

Driver version:
driver: mlx5_core
version: 6.2.16-3-pve
firmware-version: 16.27.1016 (MT_0000000167)

When i tried to add VFs to "sriov_numvfs" file, i've received the same error above:
echo 8 > /sys/class/net/ens5f1np1/device/sriov_numvfs
-bash: echo: write error: Invalid argument

mlx5_core 0000:3b:00.1: mlx5_cmd_out_err:779:(pid 8554): QUERY_HCA_CAP(0x100) op_mod(0x40) failed, status bad parameter(0x3), syndrome (0x5add>
kernel: mlx5_core 0000:3b:00.1: mlx5_device_enable_sriov:82:(pid 8554): failed to enable eswitch SRIOV (-22)
kernel: mlx5_core 0000:3b:00.1: mlx5_sriov_enable:168:(pid 8554): mlx5_device_enable_sriov failed : -22

I checked the link above of replacing the lines for "eswitch.c?" file, but the file not exists.
/usr/lib/modules/6.2.16-3-pve/kernel/drivers/net/ethernet/mellanox/mlx5/core/


Did someone manage to solve this issue?

Many Thanks.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!