Skip to content

Commit

Permalink
Merge pull request #1530 from selvintxavier/inline_fix
Browse files Browse the repository at this point in the history
bnxt_re/lib: Fix the inline size check
  • Loading branch information
rleon authored Dec 19, 2024
2 parents c8517c5 + 1eecc06 commit c1b7eff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion providers/bnxt_re/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ static inline int bnxt_re_calc_inline_len(struct ibv_send_wr *swr)
illen = 0;
for (indx = 0; indx < swr->num_sge; indx++)
illen += swr->sg_list[indx].length;
return align(illen, sizeof(struct bnxt_re_sge));
return illen;
}

static int bnxt_re_put_inline(struct bnxt_re_queue *que, uint32_t *idx,
Expand Down Expand Up @@ -1738,6 +1738,7 @@ static int bnxt_re_required_slots(struct bnxt_re_qp *qp, struct ibv_send_wr *wr,
ilsize = bnxt_re_calc_inline_len(wr);
if (ilsize > qp->cap.max_inline)
return -EINVAL;
ilsize = align(ilsize, sizeof(struct bnxt_re_sge));
if (qp->push_st_en && ilsize <= qp->max_push_sz)
*pbuf = bnxt_re_get_pbuf(&qp->push_st_en, qp->cntx);
wqe_byte = (ilsize + bnxt_re_get_sqe_hdr_sz());
Expand Down

0 comments on commit c1b7eff

Please sign in to comment.