Skip to contentSkip to conversation

IB/mlx5: Support extended number of strides for Striding RQ

PATCH Applied Leon Romanovsky 2 participants 2 messages Nov 15, 2019 – Nov 19, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 43f9013ea26c..2d83f8c1d7ba 100644
@@ -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
index 21660d3ad6fb..00fd412ef686 100644
@@ -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 3
 
 struct 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
#1 lore raw
Quoted 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 of striding_rq_caps. Choose right number of strides based on FW capability.

Quoted 7 lines
---
 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