Skip to content

Commit 0dd83a4

Browse files
hz-chengrleon
authored andcommitted
RDMA/erdma: Inline mtt entries into WQE if supported
The max inline mtt count supported is ERDMA_MAX_INLINE_MTT_ENTRIES. When mr->mem.mtt_nents == ERDMA_MAX_INLINE_MTT_ENTRIES, inline mtt is also supported, fix it. Fixes: 1550557 ("RDMA/erdma: Add verbs implementation") Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com> Link: https://lore.kernel.org/r/20230320084652.16807-4-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 6256aa9 commit 0dd83a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/infiniband/hw/erdma/erdma_qp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ static int erdma_push_one_sqe(struct erdma_qp *qp, u16 *pi,
405405
FIELD_PREP(ERDMA_SQE_MR_MTT_CNT_MASK,
406406
mr->mem.mtt_nents);
407407

408-
if (mr->mem.mtt_nents < ERDMA_MAX_INLINE_MTT_ENTRIES) {
408+
if (mr->mem.mtt_nents <= ERDMA_MAX_INLINE_MTT_ENTRIES) {
409409
attrs |= FIELD_PREP(ERDMA_SQE_MR_MTT_TYPE_MASK, 0);
410410
/* Copy SGLs to SQE content to accelerate */
411411
memcpy(get_queue_entry(qp->kern_qp.sq_buf, idx + 1,

0 commit comments

Comments
 (0)