net/mlx5: Update SRIOV enable/disable to handle EC/VFs
authorDaniel Jurgens <danielj@nvidia.com>
Tue, 7 Mar 2023 16:52:29 +0000 (18:52 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 10 Jun 2023 01:40:52 +0000 (18:40 -0700)
commit6d98f314bfca10cebf66e42573c4b362ed2ee17c
treee432fe5e11da38035348ea787e88cb3645826bb5
parent42a84a430931afe2ccf31a6910dec86e87de5d2a
net/mlx5: Update SRIOV enable/disable to handle EC/VFs

Previously on the embedded CPU platform SRIOV was never enabled/disabled
via mlx5_core_sriov_configure. Host VF updates are provided by an event
handler. Now in the disable flow it must be known if this is a disable
due to driver unload or SRIOV detach, or if the user updated the number
of VFs. If due to change in the number of VFs only wait for the pages of
ECVFs.

Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Reviewed-by: William Tu <witu@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/mellanox/mlx5/core/sriov.c