]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Use software VHCA id when it's supported
authorYishai Hadas <yishaih@nvidia.com>
Thu, 2 Jun 2022 09:47:34 +0000 (12:47 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 13 Jul 2022 22:56:45 +0000 (15:56 -0700)
commitf8588831e0021cffe7729f659c63ab04b1966200
tree44953544744df1b29390053b9b9455d4ac6a050a
parentce141c52dfcd2857d8ccd4db346b5157bbc88479
net/mlx5: Use software VHCA id when it's supported

Use software VHCA id when it's supported by the firmware.

A unique id is allocated upon mlx5_mdev_init() and freed upon
mlx5_mdev_uninit(), as such it stays the same during the full life cycle
of the device including upon health recovery if occurred.

The conjunction of sw_vhca_id with sw_owner_id will be a global unique
id per function which uses mlx5_core.

The sw_vhca_id is set upon init_hca command and is used to specify the
VHCA that the NIC vport is affiliated with.

This functionality is needed upon migration of VM which is MPV based.
(i.e. multi port device).

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fw.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/vport.c
include/linux/mlx5/driver.h