Subject: Re: [bug] failed to enable eswitch SRIOV in mlx5_device_enable_sriov()

From: Aleksander Trofimowicz <[email-masked]>
Date: Mon, 10 Jul 2023 20:10:12 +0000

Hi Mark,

Mark Bloch <[email-masked]> writes:

> On 10/07/2023 18:25, Aleksander Trofimowicz wrote:
>>
>> I've noticed a regression in the mlx5_core driver: defining VFs via
>> /sys/bus/pci/devices/.../sriov_numvfs is no longer possible.
>>
>> Upon a write call the following error is returned:
>>
>>
>> Jul 10 11:07:44 server kernel: mlx5_core 0000:c1:00.0: mlx5_cmd_out_err:803:(pid 1097): QUERY_HCA_CAP(0x100) op_mod(0x40) failed, status bad parameter(0x3), syndrome (0x5add95), err(-22)
>> Jul 10 11:07:44 server kernel: mlx5_core 0000:c1:00.0: mlx5_device_enable_sriov:82:(pid 1097): failed to enable eswitch SRIOV (-22)
>> Jul 10 11:07:44 server kernel: mlx5_core 0000:c1:00.0: mlx5_sriov_enable:168:(pid 1097): mlx5_device_enable_sriov failed : -22
>>
>
> This should fix the issue:
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c?id=6496357aa5f710eec96f91345b9da1b37c3231f6
>
Indeed, it should. Thanks for pointing the fix out.

--
Kind regards,
Aleksander Trofimowicz