]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Expose mlx5_sriov_blocking_notifier_register / unregister APIs
authorYishai Hadas <yishaih@nvidia.com>
Tue, 10 May 2022 09:02:03 +0000 (12:02 +0300)
committerLeon Romanovsky <leonro@nvidia.com>
Tue, 10 May 2022 12:45:28 +0000 (15:45 +0300)
commit160c627663d84cdb04644e909f0ed16db3b1cbac
treebf23477b694b12da9e8fd8af476a9a23592fa569
parent526df45c9b8a900af02eea2a1f511e9cec21edb7
net/mlx5: Expose mlx5_sriov_blocking_notifier_register / unregister APIs

Expose mlx5_sriov_blocking_notifier_register / unregister APIs to let a
VF register to be notified for its enablement / disablement by the PF.

Upon VF probe it will call mlx5_sriov_blocking_notifier_register() with
its notifier block and upon VF remove it will call
mlx5_sriov_blocking_notifier_unregister() to drop its registration.

This can give a VF the ability to clean some resources upon disable
before that the command interface goes down and on the other hand sets
some stuff before that it's enabled.

This may be used by a VF which is migration capable in few cases.(e.g.
PF load/unload upon an health recovery).

Link: https://lore.kernel.org/r/20220510090206.90374-2-yishaih@nvidia.com
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/sriov.c
include/linux/mlx5/driver.h