Commit 72d422c2 authored by Sindhu Devale's avatar Sindhu Devale Committed by Leon Romanovsky
Browse files

RDMA/irdma: Use HW specific minimum WQ size



HW GEN1 and GEN2 have different min WQ sizes but they are
currently set to the same value.

Use a gen specific attribute min_hw_wq_size and extend ABI to
pass it to user-space.

Signed-off-by: default avatarSindhu Devale <sindhu.devale@intel.com>
Signed-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Link: https://lore.kernel.org/r/20230725155525.1081-3-shiraz.saleem@intel.com


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 3a849872
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -254,5 +254,6 @@ void i40iw_init_hw(struct irdma_sc_dev *dev)
	dev->hw_attrs.max_stat_idx = IRDMA_HW_STAT_INDEX_MAX_GEN_1;
	dev->hw_attrs.max_hw_outbound_msg_size = I40IW_MAX_OUTBOUND_MSG_SIZE;
	dev->hw_attrs.max_hw_inbound_msg_size = I40IW_MAX_INBOUND_MSG_SIZE;
	dev->hw_attrs.uk_attrs.min_hw_wq_size = I40IW_MIN_WQ_SIZE;
	dev->hw_attrs.max_qp_wr = I40IW_MAX_QP_WRS;
}
+1 −1
Original line number Diff line number Diff line
@@ -140,11 +140,11 @@ enum i40iw_device_caps_const {
	I40IW_MAX_CQ_SIZE			= 1048575,
	I40IW_MAX_OUTBOUND_MSG_SIZE		= 2147483647,
	I40IW_MAX_INBOUND_MSG_SIZE		= 2147483647,
	I40IW_MIN_WQ_SIZE                       = 4 /* WQEs */,
};

#define I40IW_QP_WQE_MIN_SIZE   32
#define I40IW_QP_WQE_MAX_SIZE   128
#define I40IW_QP_SW_MIN_WQSIZE  4
#define I40IW_MAX_RQ_WQE_SHIFT  2
#define I40IW_MAX_QUANTA_PER_WR 2

+1 −0
Original line number Diff line number Diff line
@@ -195,6 +195,7 @@ void icrdma_init_hw(struct irdma_sc_dev *dev)
	dev->hw_attrs.max_stat_inst = ICRDMA_MAX_STATS_COUNT;
	dev->hw_attrs.max_stat_idx = IRDMA_HW_STAT_INDEX_MAX_GEN_2;

	dev->hw_attrs.uk_attrs.min_hw_wq_size = ICRDMA_MIN_WQ_SIZE;
	dev->hw_attrs.uk_attrs.max_hw_sq_chunk = IRDMA_MAX_QUANTA_PER_WR;
	dev->hw_attrs.uk_attrs.feature_flags |= IRDMA_FEATURE_RTS_AE |
						IRDMA_FEATURE_CQ_RESIZE;
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ enum icrdma_device_caps_const {

	ICRDMA_MAX_IRD_SIZE			= 127,
	ICRDMA_MAX_ORD_SIZE			= 255,
	ICRDMA_MIN_WQ_SIZE                      = 8 /* WQEs */,

};

+1 −0
Original line number Diff line number Diff line
@@ -119,6 +119,7 @@ struct irdma_uk_attrs {
	u32 min_hw_cq_size;
	u32 max_hw_cq_size;
	u16 max_hw_sq_chunk;
	u16 min_hw_wq_size;
	u8 hw_rev;
};

Loading