IB/mlx5: Support extended number of strides for Striding RQ
Subsystems (2)
PATCH 1/1 IB/mlx5: Support extended number of strides for Striding RQ
From: Mark Zhang <[email protected]>
Extends the minimum single WQE strides from 64 to 8, which is exposed by the "min_single_wqe_log_num_of_strides" field of striding_rq_caps. Choose right number of strides based on FW capability.
Signed-off-by Mark Zhang <[email protected]>
Signed-off-by Leon Romanovsky <[email protected]>
--- drivers/infiniband/hw/mlx5/main.c | 10 +++++-- drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/qp.c | 44 +++++++++++++++++++++------- 3 files changed, 43 insertions(+), 12 deletions(-)
drivers/infiniband/hw/mlx5/main.c +8 -2
@@ -1149,8 +1149,14 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,MLX5_MIN_SINGLE_STRIDE_LOG_NUM_BYTES ; resp.striding_rq_caps.max_single_stride_log_num_of_bytes =MLX5_MAX_SINGLE_STRIDE_LOG_NUM_BYTES ; - resp.striding_rq_caps.min_single_wqe_log_num_of_strides = -MLX5_MIN_SINGLE_WQE_LOG_NUM_STRIDES ; +if (MLX5_CAP_GEN (dev->mdev, ext_stride_num_range)) + resp.striding_rq_caps + .min_single_wqe_log_num_of_strides = +MLX5_EXT_MIN_SINGLE_WQE_LOG_NUM_STRIDES ; +else + resp.striding_rq_caps + .min_single_wqe_log_num_of_strides = +MLX5_MIN_SINGLE_WQE_LOG_NUM_STRIDES ; resp.striding_rq_caps.max_single_wqe_log_num_of_strides =MLX5_MAX_SINGLE_WQE_LOG_NUM_STRIDES ; resp.striding_rq_caps.supported_qpts =
drivers/infiniband/hw/mlx5/mlx5_ib.h +1 -0
@@ -291,6 +291,7 @@ enum mlx5_ib_wq_flags {#define MLX5_MAX_SINGLE_WQE_LOG_NUM_STRIDES 16#define MLX5_MIN_SINGLE_STRIDE_LOG_NUM_BYTES 6#define MLX5_MAX_SINGLE_STRIDE_LOG_NUM_BYTES 13 +#define MLX5_EXT_MIN_SINGLE_WQE_LOG_NUM_STRIDES 3struct mlx5_ib_rwq {struct ib_wq ibwq;
drivers/infiniband/hw/mlx5/qp.c +34 -10
66 lines not on this page · raw message
Signature · 1 line
2.20.1
Jason Gunthorpe
AppliedQuoted 6 lines · Leon Romanovsky
From: Mark Zhang <[email protected]>
Extends the minimum single WQE strides from 64 to 8, which is exposed by the "
min_single_wqe_log_num_of_strides" field ofstriding_rq_caps. Choose right number of strides based on FW capability.
Quoted 7 lines
Signed-off-by Mark Zhang <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/hw/mlx5/main.c | 10 +++++-- drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/qp.c | 44 +++++++++++++++++++++------- 3 files changed, 43 insertions(+), 12 deletions(-)
Applied to for-next
Thanks,
Jason