Skip to content

Commit 2335b3f

Browse files
author
Saeed Mahameed
committed
net/mlx5: mlx5_ifc, Add hardware definitions needed for adjacent vports
Next patches will implement the discovery and creation of adjacent functions vports, this patch introduces the hardware structures definitions needed for the driver implementation. Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Reviewed-by: Parav Pandit <parav@nvidia.com> Reviewed-by: Jack Morgenstein <jackm@nvidia.com> Signed-off-by: Alexei Lazar <alazar@nvidia.com>
1 parent 8f5ae30 commit 2335b3f

1 file changed

Lines changed: 129 additions & 4 deletions

File tree

include/linux/mlx5/mlx5_ifc.h

Lines changed: 129 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ enum {
189189
MLX5_CMD_OP_QUERY_XRQ_ERROR_PARAMS = 0x727,
190190
MLX5_CMD_OP_RELEASE_XRQ_ERROR = 0x729,
191191
MLX5_CMD_OP_MODIFY_XRQ = 0x72a,
192+
MLX5_CMD_OPCODE_QUERY_DELEGATED_VHCA = 0x732,
193+
MLX5_CMD_OPCODE_CREATE_ESW_VPORT = 0x733,
194+
MLX5_CMD_OPCODE_DESTROY_ESW_VPORT = 0x734,
192195
MLX5_CMD_OP_QUERY_ESW_FUNCTIONS = 0x740,
193196
MLX5_CMD_OP_QUERY_VPORT_STATE = 0x750,
194197
MLX5_CMD_OP_MODIFY_VPORT_STATE = 0x751,
@@ -2207,7 +2210,19 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
22072210

22082211
u8 reserved_at_440[0x8];
22092212
u8 max_num_eqs_24b[0x18];
2210-
u8 reserved_at_460[0x3a0];
2213+
2214+
u8 reserved_at_460[0x160];
2215+
2216+
u8 query_adjacent_functions_id[0x1];
2217+
u8 ingress_egress_esw_vport_connect[0x1];
2218+
u8 function_id_type_vhca_id[0x1];
2219+
u8 reserved_at_5c3[0xd];
2220+
u8 delegate_vhca_management_profiles[0x10];
2221+
2222+
u8 delegated_vhca_max[0x10];
2223+
u8 delegate_vhca_max[0x10];
2224+
2225+
u8 reserved_at_600[0x200];
22112226
};
22122227

22132228
enum mlx5_ifc_flow_destination_type {
@@ -5159,7 +5174,9 @@ struct mlx5_ifc_set_hca_cap_in_bits {
51595174

51605175
u8 other_function[0x1];
51615176
u8 ec_vf_function[0x1];
5162-
u8 reserved_at_42[0xe];
5177+
u8 reserved_at_42[0x1];
5178+
u8 function_id_type[0x1];
5179+
u8 reserved_at_44[0xc];
51635180
u8 function_id[0x10];
51645181

51655182
u8 reserved_at_60[0x20];
@@ -6357,7 +6374,9 @@ struct mlx5_ifc_query_hca_cap_in_bits {
63576374

63586375
u8 other_function[0x1];
63596376
u8 ec_vf_function[0x1];
6360-
u8 reserved_at_42[0xe];
6377+
u8 reserved_at_42[0x1];
6378+
u8 function_id_type[0x1];
6379+
u8 reserved_at_44[0xc];
63616380
u8 function_id[0x10];
63626381

63636382
u8 reserved_at_60[0x20];
@@ -6983,6 +7002,28 @@ struct mlx5_ifc_query_esw_vport_context_in_bits {
69837002
u8 reserved_at_60[0x20];
69847003
};
69857004

7005+
struct mlx5_ifc_destroy_esw_vport_out_bits {
7006+
u8 status[0x8];
7007+
u8 reserved_at_8[0x18];
7008+
7009+
u8 syndrome[0x20];
7010+
7011+
u8 reserved_at_40[0x20];
7012+
};
7013+
7014+
struct mlx5_ifc_destroy_esw_vport_in_bits {
7015+
u8 opcode[0x10];
7016+
u8 uid[0x10];
7017+
7018+
u8 reserved_at_20[0x10];
7019+
u8 op_mod[0x10];
7020+
7021+
u8 reserved_at_40[0x10];
7022+
u8 vport_num[0x10];
7023+
7024+
u8 reserved_at_60[0x20];
7025+
};
7026+
69867027
struct mlx5_ifc_modify_esw_vport_context_out_bits {
69877028
u8 status[0x8];
69887029
u8 reserved_at_8[0x18];
@@ -7484,6 +7525,85 @@ struct mlx5_ifc_query_adapter_in_bits {
74847525
u8 reserved_at_40[0x40];
74857526
};
74867527

7528+
struct mlx5_ifc_function_vhca_rid_info_reg_bits {
7529+
u8 host_number[0x8];
7530+
u8 host_pci_device_function[0x8];
7531+
u8 host_pci_bus[0x8];
7532+
u8 reserved_at_18[0x3];
7533+
u8 pci_bus_assigned[0x1];
7534+
u8 function_type[0x4];
7535+
7536+
u8 parent_pci_device_function[0x8];
7537+
u8 parent_pci_bus[0x8];
7538+
u8 vhca_id[0x10];
7539+
7540+
u8 reserved_at_40[0x10];
7541+
u8 function_id[0x10];
7542+
7543+
u8 reserved_at_60[0x20];
7544+
};
7545+
7546+
struct mlx5_ifc_delegated_function_vhca_rid_info_bits {
7547+
struct mlx5_ifc_function_vhca_rid_info_reg_bits function_vhca_rid_info;
7548+
7549+
u8 reserved_at_80[0x18];
7550+
u8 manage_profile[0x8];
7551+
7552+
u8 reserved_at_a0[0x60];
7553+
};
7554+
7555+
struct mlx5_ifc_query_delegated_vhca_out_bits {
7556+
u8 status[0x8];
7557+
u8 reserved_at_8[0x18];
7558+
7559+
u8 syndrome[0x20];
7560+
7561+
u8 reserved_at_40[0x20];
7562+
7563+
u8 reserved_at_60[0x10];
7564+
u8 functions_count[0x10];
7565+
7566+
u8 reserved_at_80[0x80];
7567+
7568+
struct mlx5_ifc_delegated_function_vhca_rid_info_bits
7569+
delegated_function_vhca_rid_info[];
7570+
};
7571+
7572+
struct mlx5_ifc_query_delegated_vhca_in_bits {
7573+
u8 opcode[0x10];
7574+
u8 uid[0x10];
7575+
7576+
u8 reserved_at_20[0x10];
7577+
u8 op_mod[0x10];
7578+
7579+
u8 reserved_at_40[0x40];
7580+
};
7581+
7582+
struct mlx5_ifc_create_esw_vport_out_bits {
7583+
u8 status[0x8];
7584+
u8 reserved_at_8[0x18];
7585+
7586+
u8 syndrome[0x20];
7587+
7588+
u8 reserved_at_40[0x20];
7589+
7590+
u8 reserved_at_60[0x10];
7591+
u8 vport_num[0x10];
7592+
};
7593+
7594+
struct mlx5_ifc_create_esw_vport_in_bits {
7595+
u8 opcode[0x10];
7596+
u8 reserved_at_10[0x10];
7597+
7598+
u8 reserved_at_20[0x10];
7599+
u8 op_mod[0x10];
7600+
7601+
u8 reserved_at_40[0x10];
7602+
u8 managed_vhca_id[0x10];
7603+
7604+
u8 reserved_at_60[0x20];
7605+
};
7606+
74877607
struct mlx5_ifc_qp_2rst_out_bits {
74887608
u8 status[0x8];
74897609
u8 reserved_at_8[0x18];
@@ -7611,7 +7731,12 @@ struct mlx5_ifc_modify_vport_state_in_bits {
76117731
u8 reserved_at_41[0xf];
76127732
u8 vport_number[0x10];
76137733

7614-
u8 reserved_at_60[0x18];
7734+
u8 reserved_at_60[0x10];
7735+
u8 ingress_connect[0x1];
7736+
u8 egress_connect[0x1];
7737+
u8 ingress_connect_valid[0x1];
7738+
u8 egress_connect_valid[0x1];
7739+
u8 reserved_at_74[0x4];
76157740
u8 admin_state[0x4];
76167741
u8 reserved_at_7c[0x4];
76177742
};

0 commit comments

Comments
 (0)