summaryrefslogtreecommitdiff
path: root/include/linux/mlx5/driver.h
diff options
context:
space:
mode:
authorArmen Ratner <armeng@nvidia.com>2023-09-08 22:53:09 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2023-12-21 03:54:27 +0300
commit22c4640698a1d47606b5a4264a584e8046641784 (patch)
tree12ba0503420f2ddb256d793246d84e44d089dbb0 /include/linux/mlx5/driver.h
parentc88c49ac9c18fb7c3fa431126de1d8f8f555e912 (diff)
downloadlinux-22c4640698a1d47606b5a4264a584e8046641784.tar.xz
net/mlx5: Implement management PF Ethernet profile
Add management PF modules, which introduce support for the structures needed to create the resources for the MGMT PF to work. Also, add the necessary calls and functions to establish this functionality. Signed-off-by: Armen Ratner <armeng@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Daniel Jurgens <danielj@nvidia.com>
Diffstat (limited to 'include/linux/mlx5/driver.h')
-rw-r--r--include/linux/mlx5/driver.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index cd286b681970..2bba88c67f58 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -1224,6 +1224,14 @@ static inline bool mlx5_core_is_ecpf(const struct mlx5_core_dev *dev)
return dev->caps.embedded_cpu;
}
+static inline bool mlx5_core_is_mgmt_pf(const struct mlx5_core_dev *dev)
+{
+ if (!MLX5_CAP_GEN_2(dev, local_mng_port_valid))
+ return false;
+
+ return MLX5_CAP_GEN_2(dev, local_mng_port);
+}
+
static inline bool
mlx5_core_is_ecpf_esw_manager(const struct mlx5_core_dev *dev)
{