On Sat, May 23, 2020 at 04:22:41PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky <leonro@xxxxxxxxxxxx> > > The ECE bits are configured through create_qp and modify_qp commands. > While the create_qp() can be easily extended, it is not an easy task > for the modify_qp(). > > The new bit in the comp_mask is needed to mark that kernel supports > ECE and can receive data instead of "reserved" field in the > struct mlx5_ib_modify_qp. > > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> > drivers/infiniband/hw/mlx5/main.c | 3 +++ > include/uapi/rdma/mlx5-abi.h | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c > index 6094ab2f4cd7..570c519ca530 100644 > +++ b/drivers/infiniband/hw/mlx5/main.c > @@ -1971,6 +1971,9 @@ static int mlx5_ib_alloc_ucontext(struct ib_ucontext *uctx, > resp.response_length += sizeof(resp.dump_fill_mkey); > } > > + if (MLX5_CAP_GEN(dev->mdev, ece_support)) > + resp.comp_mask |= MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_ECE; > + > err = ib_copy_to_udata(udata, &resp, resp.response_length); > if (err) > goto out_mdev; > diff --git a/include/uapi/rdma/mlx5-abi.h b/include/uapi/rdma/mlx5-abi.h > index bc9d9e3cb369..90ea1e5aa291 100644 > +++ b/include/uapi/rdma/mlx5-abi.h > @@ -100,6 +100,7 @@ struct mlx5_ib_alloc_ucontext_req_v2 { > enum mlx5_ib_alloc_ucontext_resp_mask { > MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0, > MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_DUMP_FILL_MKEY = 1UL << 1, > + MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_ECE = 1UL << 2, > }; This should be squashed into the patch overriding the reserved field Jason