summaryrefslogtreecommitdiff
path: root/include/linux/mlx5/driver.h
diff options
context:
space:
mode:
authorShay Drory <shayd@nvidia.com>2022-06-29 11:38:21 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2023-01-11 08:24:41 +0300
commitfe998a3c77b9f989a30a2a01fb00d3729a6d53a4 (patch)
tree3c219e56720370e38b36443b46cad604ae9d96a7 /include/linux/mlx5/driver.h
parent0e414518d6d881075f0c944b365078b8049fcc2f (diff)
downloadlinux-fe998a3c77b9f989a30a2a01fb00d3729a6d53a4.tar.xz
net/mlx5: Enable management PF initialization
Enable initialization of DPU Management PF, which is a new loopback PF designed for communication with BMC. For now Management PF doesn't support nor require most upper layer protocols so avoid them. Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Eran Ben Elisha <eranbe@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 0c4f6acf59ca..50a5780367fa 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -1202,6 +1202,11 @@ static inline bool mlx5_core_is_vf(const struct mlx5_core_dev *dev)
return dev->coredev_type == MLX5_COREDEV_VF;
}
+static inline bool mlx5_core_is_management_pf(const struct mlx5_core_dev *dev)
+{
+ return MLX5_CAP_GEN(dev, num_ports) == 1 && !MLX5_CAP_GEN(dev, native_port_num);
+}
+
static inline bool mlx5_core_is_ecpf(const struct mlx5_core_dev *dev)
{
return dev->caps.embedded_cpu;