Skip to content

Commit

Permalink
net/mlx5: Add ability to read and write ECE options
Browse files Browse the repository at this point in the history
The end result of RDMA-CM ECE handshake is ECE options, which is
needed to be used while configuring data QPs. Such options can
come in any QP state, so add in/out fields to set and query
ECE options.

OUT fields:
* create_qp() - default ECE options for that type of QP.
* modify_qp() - enabled ECE options after QP state transition.

IN fields:
* create_qp() - create QP with this ECE option.
* modify_qp() - requested options. For unconnected QPs, the FW
will return an error if ECE is already configured with any options
that not equal to previously set.

Reviewed-by: Mark Zhang <[email protected]>
Reviewed-by: Maor Gottlieb <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
  • Loading branch information
Leon Romanovsky committed May 27, 2020
1 parent ecf814e commit 6b646a7
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions include/linux/mlx5/mlx5_ifc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
u8 reserved_at_99[0x2];
u8 log_max_qp[0x5];

u8 reserved_at_a0[0xb];
u8 reserved_at_a0[0x3];
u8 ece_support[0x1];
u8 reserved_at_a4[0x7];
u8 log_max_srq[0x5];
u8 reserved_at_b0[0x10];

Expand Down Expand Up @@ -4216,7 +4218,8 @@ struct mlx5_ifc_rts2rts_qp_out_bits {

u8 syndrome[0x20];

u8 reserved_at_40[0x40];
u8 reserved_at_40[0x20];
u8 ece[0x20];
};

struct mlx5_ifc_rts2rts_qp_in_bits {
Expand All @@ -4233,7 +4236,7 @@ struct mlx5_ifc_rts2rts_qp_in_bits {

u8 opt_param_mask[0x20];

u8 reserved_at_a0[0x20];
u8 ece[0x20];

struct mlx5_ifc_qpc_bits qpc;

Expand All @@ -4246,7 +4249,8 @@ struct mlx5_ifc_rtr2rts_qp_out_bits {

u8 syndrome[0x20];

u8 reserved_at_40[0x40];
u8 reserved_at_40[0x20];
u8 ece[0x20];
};

struct mlx5_ifc_rtr2rts_qp_in_bits {
Expand All @@ -4263,7 +4267,7 @@ struct mlx5_ifc_rtr2rts_qp_in_bits {

u8 opt_param_mask[0x20];

u8 reserved_at_a0[0x20];
u8 ece[0x20];

struct mlx5_ifc_qpc_bits qpc;

Expand Down Expand Up @@ -4815,7 +4819,8 @@ struct mlx5_ifc_query_qp_out_bits {

u8 syndrome[0x20];

u8 reserved_at_40[0x40];
u8 reserved_at_40[0x20];
u8 ece[0x20];

u8 opt_param_mask[0x20];

Expand Down Expand Up @@ -6580,7 +6585,8 @@ struct mlx5_ifc_init2rtr_qp_out_bits {

u8 syndrome[0x20];

u8 reserved_at_40[0x40];
u8 reserved_at_40[0x20];
u8 ece[0x20];
};

struct mlx5_ifc_init2rtr_qp_in_bits {
Expand All @@ -6597,7 +6603,7 @@ struct mlx5_ifc_init2rtr_qp_in_bits {

u8 opt_param_mask[0x20];

u8 reserved_at_a0[0x20];
u8 ece[0x20];

struct mlx5_ifc_qpc_bits qpc;

Expand Down Expand Up @@ -7693,7 +7699,7 @@ struct mlx5_ifc_create_qp_out_bits {
u8 reserved_at_40[0x8];
u8 qpn[0x18];

u8 reserved_at_60[0x20];
u8 ece[0x20];
};

struct mlx5_ifc_create_qp_in_bits {
Expand All @@ -7707,7 +7713,7 @@ struct mlx5_ifc_create_qp_in_bits {

u8 opt_param_mask[0x20];

u8 reserved_at_a0[0x20];
u8 ece[0x20];

struct mlx5_ifc_qpc_bits qpc;

Expand Down

0 comments on commit 6b646a7

Please sign in to comment.