Skip to content

Commit f5a7cbe

Browse files
wenglianfarleon
authored andcommitted
RDMA/hns: Fix the modification of max_send_sge
The actual sge number may exceed the value specified in init_attr->cap when HW needs extra sge to enable inline feature. Since these extra sges are not expected by ULP, return the user-specified value to ULP instead of the expanded sge number. Fixes: 0c5e259 ("RDMA/hns: Fix incorrect sge nums calculation") Signed-off-by: wenglianfa <[email protected]> Signed-off-by: Junxian Huang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent c4b67b5 commit f5a7cbe

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/infiniband/hw/hns/hns_roce_qp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,6 @@ static int set_user_sq_size(struct hns_roce_dev *hr_dev,
662662

663663
hr_qp->sq.wqe_shift = ucmd->log_sq_stride;
664664
hr_qp->sq.wqe_cnt = cnt;
665-
cap->max_send_sge = hr_qp->sq.max_gs;
666665

667666
return 0;
668667
}
@@ -744,7 +743,6 @@ static int set_kernel_sq_size(struct hns_roce_dev *hr_dev,
744743

745744
/* sync the parameters of kernel QP to user's configuration */
746745
cap->max_send_wr = cnt;
747-
cap->max_send_sge = hr_qp->sq.max_gs;
748746

749747
return 0;
750748
}

0 commit comments

Comments
 (0)