summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArmen Ratner <armeng@nvidia.com>2023-09-08 14:53:09 -0500
committerSaeed Mahameed <saeedm@nvidia.com>2023-12-20 16:54:27 -0800
commit22c4640698a1d47606b5a4264a584e8046641784 (patch)
tree12ba0503420f2ddb256d793246d84e44d089dbb0 /include
parentc88c49ac9c18fb7c3fa431126de1d8f8f555e912 (diff)
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')
-rw-r--r--include/linux/mlx5/driver.h8
-rw-r--r--include/linux/mlx5/mlx5_ifc.h14
2 files changed, 19 insertions, 3 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)
{
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index bf2d51952e48..586569209254 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -1954,8 +1954,10 @@ enum {
struct mlx5_ifc_cmd_hca_cap_2_bits {
u8 reserved_at_0[0x80];
- u8 migratable[0x1];
- u8 reserved_at_81[0x1f];
+ u8 migratable[0x1];
+ u8 reserved_at_81[0x19];
+ u8 local_mng_port[0x1];
+ u8 reserved_at_9b[0x5];
u8 max_reformat_insert_size[0x8];
u8 max_reformat_insert_offset[0x8];
@@ -1973,7 +1975,13 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
u8 allowed_object_for_other_vhca_access[0x40];
- u8 reserved_at_140[0x60];
+ u8 reserved_at_140[0x20];
+
+ u8 reserved_at_160[0xa];
+ u8 local_mng_port_valid[0x1];
+ u8 reserved_at_16b[0x15];
+
+ u8 reserved_at_180[0x20];
u8 flow_table_type_2_type[0x8];
u8 reserved_at_1a8[0x3];