aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/driver.h
diff options
context:
space:
mode:
authorYishai Hadas <yishaih@nvidia.com>2022-06-02 12:47:34 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2022-07-13 15:56:45 -0700
commitdc402ccc0d7b55922a79505df3000da7deb77a2b (patch)
tree44953544744df1b29390053b9b9455d4ac6a050a /include/linux/mlx5/driver.h
parentnet/mlx5: Introduce ifc bits for using software vhca id (diff)
downloadlinux-dev-dc402ccc0d7b55922a79505df3000da7deb77a2b.tar.xz
linux-dev-dc402ccc0d7b55922a79505df3000da7deb77a2b.zip
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>
Diffstat (limited to 'include/linux/mlx5/driver.h')
-rw-r--r--include/linux/mlx5/driver.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index bd882884b23c..ecda6e63d5f2 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -610,6 +610,7 @@ struct mlx5_priv {
spinlock_t ctx_lock;
struct mlx5_adev **adev;
int adev_idx;
+ int sw_vhca_id;
struct mlx5_events *events;
struct mlx5_flow_steering *steering;